diff --git a/profiles/preview/preview/migrate/mgmt/migrate/models.go b/profiles/preview/preview/migrate/mgmt/migrate/models.go new file mode 100644 index 000000000000..33f84c883b2e --- /dev/null +++ b/profiles/preview/preview/migrate/mgmt/migrate/models.go @@ -0,0 +1,415 @@ +// +build go1.9 + +// 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. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package migrate + +import original "github.com/Azure/azure-sdk-for-go/services/preview/migrate/mgmt/2018-09-01-preview/migrate" + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type BaseClient = original.BaseClient +type ErrorsClient = original.ErrorsClient +type MachinesClient = original.MachinesClient +type ContainerElementKind = original.ContainerElementKind + +const ( + ActionImport ContainerElementKind = original.ActionImport + EntitySet ContainerElementKind = original.EntitySet + FunctionImport ContainerElementKind = original.FunctionImport + None ContainerElementKind = original.None + Singleton ContainerElementKind = original.Singleton +) + +type Direction = original.Direction + +const ( + Ascending Direction = original.Ascending + Descending Direction = original.Descending +) + +type Direction1 = original.Direction1 + +const ( + Direction1Ascending Direction1 = original.Direction1Ascending + Direction1Descending Direction1 = original.Direction1Descending +) + +type ExpressionKind = original.ExpressionKind + +const ( + ExpressionKindAnnotationPath ExpressionKind = original.ExpressionKindAnnotationPath + ExpressionKindBinaryConstant ExpressionKind = original.ExpressionKindBinaryConstant + ExpressionKindBooleanConstant ExpressionKind = original.ExpressionKindBooleanConstant + ExpressionKindCast ExpressionKind = original.ExpressionKindCast + ExpressionKindCollection ExpressionKind = original.ExpressionKindCollection + ExpressionKindDateConstant ExpressionKind = original.ExpressionKindDateConstant + ExpressionKindDateTimeOffsetConstant ExpressionKind = original.ExpressionKindDateTimeOffsetConstant + ExpressionKindDecimalConstant ExpressionKind = original.ExpressionKindDecimalConstant + ExpressionKindDurationConstant ExpressionKind = original.ExpressionKindDurationConstant + ExpressionKindEnumMember ExpressionKind = original.ExpressionKindEnumMember + ExpressionKindFloatingConstant ExpressionKind = original.ExpressionKindFloatingConstant + ExpressionKindFunctionApplication ExpressionKind = original.ExpressionKindFunctionApplication + ExpressionKindGUIDConstant ExpressionKind = original.ExpressionKindGUIDConstant + ExpressionKindIf ExpressionKind = original.ExpressionKindIf + ExpressionKindIntegerConstant ExpressionKind = original.ExpressionKindIntegerConstant + ExpressionKindIsType ExpressionKind = original.ExpressionKindIsType + ExpressionKindLabeled ExpressionKind = original.ExpressionKindLabeled + ExpressionKindLabeledExpressionReference ExpressionKind = original.ExpressionKindLabeledExpressionReference + ExpressionKindNavigationPropertyPath ExpressionKind = original.ExpressionKindNavigationPropertyPath + ExpressionKindNone ExpressionKind = original.ExpressionKindNone + ExpressionKindNull ExpressionKind = original.ExpressionKindNull + ExpressionKindPath ExpressionKind = original.ExpressionKindPath + ExpressionKindPropertyPath ExpressionKind = original.ExpressionKindPropertyPath + ExpressionKindRecord ExpressionKind = original.ExpressionKindRecord + ExpressionKindStringConstant ExpressionKind = original.ExpressionKindStringConstant + ExpressionKindTimeOfDayConstant ExpressionKind = original.ExpressionKindTimeOfDayConstant +) + +type ExpressionKind1 = original.ExpressionKind1 + +const ( + ExpressionKind1AnnotationPath ExpressionKind1 = original.ExpressionKind1AnnotationPath + ExpressionKind1BinaryConstant ExpressionKind1 = original.ExpressionKind1BinaryConstant + ExpressionKind1BooleanConstant ExpressionKind1 = original.ExpressionKind1BooleanConstant + ExpressionKind1Cast ExpressionKind1 = original.ExpressionKind1Cast + ExpressionKind1Collection ExpressionKind1 = original.ExpressionKind1Collection + ExpressionKind1DateConstant ExpressionKind1 = original.ExpressionKind1DateConstant + ExpressionKind1DateTimeOffsetConstant ExpressionKind1 = original.ExpressionKind1DateTimeOffsetConstant + ExpressionKind1DecimalConstant ExpressionKind1 = original.ExpressionKind1DecimalConstant + ExpressionKind1DurationConstant ExpressionKind1 = original.ExpressionKind1DurationConstant + ExpressionKind1EnumMember ExpressionKind1 = original.ExpressionKind1EnumMember + ExpressionKind1FloatingConstant ExpressionKind1 = original.ExpressionKind1FloatingConstant + ExpressionKind1FunctionApplication ExpressionKind1 = original.ExpressionKind1FunctionApplication + ExpressionKind1GUIDConstant ExpressionKind1 = original.ExpressionKind1GUIDConstant + ExpressionKind1If ExpressionKind1 = original.ExpressionKind1If + ExpressionKind1IntegerConstant ExpressionKind1 = original.ExpressionKind1IntegerConstant + ExpressionKind1IsType ExpressionKind1 = original.ExpressionKind1IsType + ExpressionKind1Labeled ExpressionKind1 = original.ExpressionKind1Labeled + ExpressionKind1LabeledExpressionReference ExpressionKind1 = original.ExpressionKind1LabeledExpressionReference + ExpressionKind1NavigationPropertyPath ExpressionKind1 = original.ExpressionKind1NavigationPropertyPath + ExpressionKind1None ExpressionKind1 = original.ExpressionKind1None + ExpressionKind1Null ExpressionKind1 = original.ExpressionKind1Null + ExpressionKind1Path ExpressionKind1 = original.ExpressionKind1Path + ExpressionKind1PropertyPath ExpressionKind1 = original.ExpressionKind1PropertyPath + ExpressionKind1Record ExpressionKind1 = original.ExpressionKind1Record + ExpressionKind1StringConstant ExpressionKind1 = original.ExpressionKind1StringConstant + ExpressionKind1TimeOfDayConstant ExpressionKind1 = original.ExpressionKind1TimeOfDayConstant +) + +type Kind = original.Kind + +const ( + Aggregate Kind = original.Aggregate + Compute Kind = original.Compute + Filter Kind = original.Filter + GroupBy Kind = original.GroupBy +) + +type Kind1 = original.Kind1 + +const ( + Kind1AggregatedCollectionPropertyNode Kind1 = original.Kind1AggregatedCollectionPropertyNode + Kind1All Kind1 = original.Kind1All + Kind1Any Kind1 = original.Kind1Any + Kind1BinaryOperator Kind1 = original.Kind1BinaryOperator + Kind1CollectionComplexNode Kind1 = original.Kind1CollectionComplexNode + Kind1CollectionConstant Kind1 = original.Kind1CollectionConstant + Kind1CollectionFunctionCall Kind1 = original.Kind1CollectionFunctionCall + Kind1CollectionNavigationNode Kind1 = original.Kind1CollectionNavigationNode + Kind1CollectionOpenPropertyAccess Kind1 = original.Kind1CollectionOpenPropertyAccess + Kind1CollectionPropertyAccess Kind1 = original.Kind1CollectionPropertyAccess + Kind1CollectionPropertyNode Kind1 = original.Kind1CollectionPropertyNode + Kind1CollectionResourceCast Kind1 = original.Kind1CollectionResourceCast + Kind1CollectionResourceFunctionCall Kind1 = original.Kind1CollectionResourceFunctionCall + Kind1Constant Kind1 = original.Kind1Constant + Kind1Convert Kind1 = original.Kind1Convert + Kind1Count Kind1 = original.Kind1Count + Kind1EntitySet Kind1 = original.Kind1EntitySet + Kind1In Kind1 = original.Kind1In + Kind1KeyLookup Kind1 = original.Kind1KeyLookup + Kind1NamedFunctionParameter Kind1 = original.Kind1NamedFunctionParameter + Kind1None Kind1 = original.Kind1None + Kind1NonResourceRangeVariableReference Kind1 = original.Kind1NonResourceRangeVariableReference + Kind1ParameterAlias Kind1 = original.Kind1ParameterAlias + Kind1ResourceRangeVariableReference Kind1 = original.Kind1ResourceRangeVariableReference + Kind1SearchTerm Kind1 = original.Kind1SearchTerm + Kind1SingleComplexNode Kind1 = original.Kind1SingleComplexNode + Kind1SingleNavigationNode Kind1 = original.Kind1SingleNavigationNode + Kind1SingleResourceCast Kind1 = original.Kind1SingleResourceCast + Kind1SingleResourceFunctionCall Kind1 = original.Kind1SingleResourceFunctionCall + Kind1SingleValueCast Kind1 = original.Kind1SingleValueCast + Kind1SingleValueFunctionCall Kind1 = original.Kind1SingleValueFunctionCall + Kind1SingleValueOpenPropertyAccess Kind1 = original.Kind1SingleValueOpenPropertyAccess + Kind1SingleValuePropertyAccess Kind1 = original.Kind1SingleValuePropertyAccess + Kind1UnaryOperator Kind1 = original.Kind1UnaryOperator +) + +type OnDelete = original.OnDelete + +const ( + OnDeleteCascade OnDelete = original.OnDeleteCascade + OnDeleteNone OnDelete = original.OnDeleteNone +) + +type PropertyKind = original.PropertyKind + +const ( + PropertyKindNavigation PropertyKind = original.PropertyKindNavigation + PropertyKindNone PropertyKind = original.PropertyKindNone + PropertyKindStructural PropertyKind = original.PropertyKindStructural +) + +type PropertyKind1 = original.PropertyKind1 + +const ( + PropertyKind1Navigation PropertyKind1 = original.PropertyKind1Navigation + PropertyKind1None PropertyKind1 = original.PropertyKind1None + PropertyKind1Structural PropertyKind1 = original.PropertyKind1Structural +) + +type PropertyKind2 = original.PropertyKind2 + +const ( + PropertyKind2Navigation PropertyKind2 = original.PropertyKind2Navigation + PropertyKind2None PropertyKind2 = original.PropertyKind2None + PropertyKind2Structural PropertyKind2 = original.PropertyKind2Structural +) + +type SchemaElementKind = original.SchemaElementKind + +const ( + SchemaElementKindAction SchemaElementKind = original.SchemaElementKindAction + SchemaElementKindEntityContainer SchemaElementKind = original.SchemaElementKindEntityContainer + SchemaElementKindFunction SchemaElementKind = original.SchemaElementKindFunction + SchemaElementKindNone SchemaElementKind = original.SchemaElementKindNone + SchemaElementKindTerm SchemaElementKind = original.SchemaElementKindTerm + SchemaElementKindTypeDefinition SchemaElementKind = original.SchemaElementKindTypeDefinition +) + +type SchemaElementKind1 = original.SchemaElementKind1 + +const ( + SchemaElementKind1Action SchemaElementKind1 = original.SchemaElementKind1Action + SchemaElementKind1EntityContainer SchemaElementKind1 = original.SchemaElementKind1EntityContainer + SchemaElementKind1Function SchemaElementKind1 = original.SchemaElementKind1Function + SchemaElementKind1None SchemaElementKind1 = original.SchemaElementKind1None + SchemaElementKind1Term SchemaElementKind1 = original.SchemaElementKind1Term + SchemaElementKind1TypeDefinition SchemaElementKind1 = original.SchemaElementKind1TypeDefinition +) + +type SchemaElementKind2 = original.SchemaElementKind2 + +const ( + SchemaElementKind2Action SchemaElementKind2 = original.SchemaElementKind2Action + SchemaElementKind2EntityContainer SchemaElementKind2 = original.SchemaElementKind2EntityContainer + SchemaElementKind2Function SchemaElementKind2 = original.SchemaElementKind2Function + SchemaElementKind2None SchemaElementKind2 = original.SchemaElementKind2None + SchemaElementKind2Term SchemaElementKind2 = original.SchemaElementKind2Term + SchemaElementKind2TypeDefinition SchemaElementKind2 = original.SchemaElementKind2TypeDefinition +) + +type TypeKind = original.TypeKind + +const ( + TypeKindCollection TypeKind = original.TypeKindCollection + TypeKindComplex TypeKind = original.TypeKindComplex + TypeKindEntity TypeKind = original.TypeKindEntity + TypeKindEntityReference TypeKind = original.TypeKindEntityReference + TypeKindEnum TypeKind = original.TypeKindEnum + TypeKindNone TypeKind = original.TypeKindNone + TypeKindPath TypeKind = original.TypeKindPath + TypeKindPrimitive TypeKind = original.TypeKindPrimitive + TypeKindTypeDefinition TypeKind = original.TypeKindTypeDefinition + TypeKindUntyped TypeKind = original.TypeKindUntyped +) + +type TypeKind1 = original.TypeKind1 + +const ( + TypeKind1Collection TypeKind1 = original.TypeKind1Collection + TypeKind1Complex TypeKind1 = original.TypeKind1Complex + TypeKind1Entity TypeKind1 = original.TypeKind1Entity + TypeKind1EntityReference TypeKind1 = original.TypeKind1EntityReference + TypeKind1Enum TypeKind1 = original.TypeKind1Enum + TypeKind1None TypeKind1 = original.TypeKind1None + TypeKind1Path TypeKind1 = original.TypeKind1Path + TypeKind1Primitive TypeKind1 = original.TypeKind1Primitive + TypeKind1TypeDefinition TypeKind1 = original.TypeKind1TypeDefinition + TypeKind1Untyped TypeKind1 = original.TypeKind1Untyped +) + +type ApplyClause = original.ApplyClause +type ApplyQueryOption = original.ApplyQueryOption +type AssessmentDetails = original.AssessmentDetails +type CountQueryOption = original.CountQueryOption +type DefaultQuerySettings = original.DefaultQuerySettings +type DiscoveryDetails = original.DiscoveryDetails +type EdmReferentialConstraintPropertyPair = original.EdmReferentialConstraintPropertyPair +type Error = original.Error +type ErrorCollection = original.ErrorCollection +type ErrorProperties = original.ErrorProperties +type FilterClause = original.FilterClause +type FilterQueryOption = original.FilterQueryOption +type GoalSummary = original.GoalSummary +type IEdmEntityContainer = original.IEdmEntityContainer +type IEdmEntityContainerElement = original.IEdmEntityContainerElement +type IEdmExpression = original.IEdmExpression +type IEdmModel = original.IEdmModel +type IEdmNavigationProperty = original.IEdmNavigationProperty +type IEdmNavigationPropertyBinding = original.IEdmNavigationPropertyBinding +type IEdmNavigationSource = original.IEdmNavigationSource +type IEdmPathExpression = original.IEdmPathExpression +type IEdmProperty = original.IEdmProperty +type IEdmReferentialConstraint = original.IEdmReferentialConstraint +type IEdmSchemaElement = original.IEdmSchemaElement +type IEdmStructuralProperty = original.IEdmStructuralProperty +type IEdmStructuredType = original.IEdmStructuredType +type IEdmTerm = original.IEdmTerm +type IEdmType = original.IEdmType +type IEdmTypeReference = original.IEdmTypeReference +type IEdmVocabularyAnnotation = original.IEdmVocabularyAnnotation +type Machine = original.Machine +type MachineCollection = original.MachineCollection +type MachineProperties = original.MachineProperties +type MigrationDetails = original.MigrationDetails +type ODataPath = original.ODataPath +type ODataPathSegment = original.ODataPathSegment +type ODataQueryContext = original.ODataQueryContext +type ODataQueryOptions1 = original.ODataQueryOptions1 +type ODataRawQueryOptions = original.ODataRawQueryOptions +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationResultList = original.OperationResultList +type OrderByClause = original.OrderByClause +type OrderByNode = original.OrderByNode +type OrderByQueryOption = original.OrderByQueryOption +type Project = original.Project +type ProjectProperties = original.ProjectProperties +type RangeVariable = original.RangeVariable +type RefreshSummaryResult = original.RefreshSummaryResult +type RegisterToolInput = original.RegisterToolInput +type RegistrationResult = original.RegistrationResult +type SelectExpandClause = original.SelectExpandClause +type SelectExpandQueryOption = original.SelectExpandQueryOption +type SingleValueNode = original.SingleValueNode +type SkipQueryOption = original.SkipQueryOption +type Solution = original.Solution +type SolutionConfig = original.SolutionConfig +type SolutionDetails = original.SolutionDetails +type SolutionProperties = original.SolutionProperties +type SolutionsCollection = original.SolutionsCollection +type SolutionSummary = original.SolutionSummary +type TopQueryOption = original.TopQueryOption +type TransformationNode = original.TransformationNode +type OperationsClient = original.OperationsClient +type ProjectsClient = original.ProjectsClient +type SolutionsClient = original.SolutionsClient + +func New(subscriptionID string, acceptLanguage string) BaseClient { + return original.New(subscriptionID, acceptLanguage) +} +func NewWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func NewErrorsClient(subscriptionID string, acceptLanguage string) ErrorsClient { + return original.NewErrorsClient(subscriptionID, acceptLanguage) +} +func NewErrorsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ErrorsClient { + return original.NewErrorsClientWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func NewMachinesClient(subscriptionID string, acceptLanguage string) MachinesClient { + return original.NewMachinesClient(subscriptionID, acceptLanguage) +} +func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) MachinesClient { + return original.NewMachinesClientWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func PossibleContainerElementKindValues() []ContainerElementKind { + return original.PossibleContainerElementKindValues() +} +func PossibleDirectionValues() []Direction { + return original.PossibleDirectionValues() +} +func PossibleDirection1Values() []Direction1 { + return original.PossibleDirection1Values() +} +func PossibleExpressionKindValues() []ExpressionKind { + return original.PossibleExpressionKindValues() +} +func PossibleExpressionKind1Values() []ExpressionKind1 { + return original.PossibleExpressionKind1Values() +} +func PossibleKindValues() []Kind { + return original.PossibleKindValues() +} +func PossibleKind1Values() []Kind1 { + return original.PossibleKind1Values() +} +func PossibleOnDeleteValues() []OnDelete { + return original.PossibleOnDeleteValues() +} +func PossiblePropertyKindValues() []PropertyKind { + return original.PossiblePropertyKindValues() +} +func PossiblePropertyKind1Values() []PropertyKind1 { + return original.PossiblePropertyKind1Values() +} +func PossiblePropertyKind2Values() []PropertyKind2 { + return original.PossiblePropertyKind2Values() +} +func PossibleSchemaElementKindValues() []SchemaElementKind { + return original.PossibleSchemaElementKindValues() +} +func PossibleSchemaElementKind1Values() []SchemaElementKind1 { + return original.PossibleSchemaElementKind1Values() +} +func PossibleSchemaElementKind2Values() []SchemaElementKind2 { + return original.PossibleSchemaElementKind2Values() +} +func PossibleTypeKindValues() []TypeKind { + return original.PossibleTypeKindValues() +} +func PossibleTypeKind1Values() []TypeKind1 { + return original.PossibleTypeKind1Values() +} +func NewOperationsClient(subscriptionID string, acceptLanguage string) OperationsClient { + return original.NewOperationsClient(subscriptionID, acceptLanguage) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func NewProjectsClient(subscriptionID string, acceptLanguage string) ProjectsClient { + return original.NewProjectsClient(subscriptionID, acceptLanguage) +} +func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ProjectsClient { + return original.NewProjectsClientWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func NewSolutionsClient(subscriptionID string, acceptLanguage string) SolutionsClient { + return original.NewSolutionsClient(subscriptionID, acceptLanguage) +} +func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) SolutionsClient { + return original.NewSolutionsClientWithBaseURI(baseURI, subscriptionID, acceptLanguage) +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go new file mode 100644 index 000000000000..32a3c19821ca --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go @@ -0,0 +1,53 @@ +// Package migrate implements the Azure ARM Migrate service API version 2018-09-01-preview. +// +// Migrate your workloads to Azure. +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Migrate + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Migrate. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string + AcceptLanguage string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string, acceptLanguage string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + AcceptLanguage: acceptLanguage, + } +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/errors.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/errors.go new file mode 100644 index 000000000000..22ed447f829b --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/errors.go @@ -0,0 +1,252 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ErrorsClient is the migrate your workloads to Azure. +type ErrorsClient struct { + BaseClient +} + +// NewErrorsClient creates an instance of the ErrorsClient client. +func NewErrorsClient(subscriptionID string, acceptLanguage string) ErrorsClient { + return NewErrorsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewErrorsClientWithBaseURI creates an instance of the ErrorsClient client. +func NewErrorsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ErrorsClient { + return ErrorsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} +} + +// DeleteError delete the migrate error. Deleting non-existent migrate error is a no-operation. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// errorName - unique name of an error within a migrate project. +func (client ErrorsClient) DeleteError(ctx context.Context, resourceGroupName string, migrateProjectName string, errorName string) (result autorest.Response, err error) { + req, err := client.DeleteErrorPreparer(ctx, resourceGroupName, migrateProjectName, errorName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "DeleteError", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteErrorSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "DeleteError", resp, "Failure sending request") + return + } + + result, err = client.DeleteErrorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "DeleteError", resp, "Failure responding to request") + } + + return +} + +// DeleteErrorPreparer prepares the DeleteError request. +func (client ErrorsClient) DeleteErrorPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, errorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "errorName": autorest.Encode("path", errorName), + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/MigrateErrors/{errorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteErrorSender sends the DeleteError request. The method will close the +// http.Response Body if it receives an error. +func (client ErrorsClient) DeleteErrorSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteErrorResponder handles the response to the DeleteError request. The method always +// closes the http.Response Body. +func (client ErrorsClient) DeleteErrorResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnumerateErrors sends the enumerate errors request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// continuationToken - the continuation token. +func (client ErrorsClient) EnumerateErrors(ctx context.Context, resourceGroupName string, migrateProjectName string, continuationToken string) (result ErrorCollection, err error) { + req, err := client.EnumerateErrorsPreparer(ctx, resourceGroupName, migrateProjectName, continuationToken) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "EnumerateErrors", nil, "Failure preparing request") + return + } + + resp, err := client.EnumerateErrorsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "EnumerateErrors", resp, "Failure sending request") + return + } + + result, err = client.EnumerateErrorsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "EnumerateErrors", resp, "Failure responding to request") + } + + return +} + +// EnumerateErrorsPreparer prepares the EnumerateErrors request. +func (client ErrorsClient) EnumerateErrorsPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, continuationToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["continuationToken"] = autorest.Encode("query", continuationToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/MigrateErrors", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnumerateErrorsSender sends the EnumerateErrors request. The method will close the +// http.Response Body if it receives an error. +func (client ErrorsClient) EnumerateErrorsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// EnumerateErrorsResponder handles the response to the EnumerateErrors request. The method always +// closes the http.Response Body. +func (client ErrorsClient) EnumerateErrorsResponder(resp *http.Response) (result ErrorCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetError sends the get error request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// errorName - unique name of an error within a migrate project. +func (client ErrorsClient) GetError(ctx context.Context, resourceGroupName string, migrateProjectName string, errorName string) (result Error, err error) { + req, err := client.GetErrorPreparer(ctx, resourceGroupName, migrateProjectName, errorName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "GetError", nil, "Failure preparing request") + return + } + + resp, err := client.GetErrorSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "GetError", resp, "Failure sending request") + return + } + + result, err = client.GetErrorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ErrorsClient", "GetError", resp, "Failure responding to request") + } + + return +} + +// GetErrorPreparer prepares the GetError request. +func (client ErrorsClient) GetErrorPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, errorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "errorName": autorest.Encode("path", errorName), + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/MigrateErrors/{errorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetErrorSender sends the GetError request. The method will close the +// http.Response Body if it receives an error. +func (client ErrorsClient) GetErrorSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetErrorResponder handles the response to the GetError request. The method always +// closes the http.Response Body. +func (client ErrorsClient) GetErrorResponder(resp *http.Response) (result Error, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go new file mode 100644 index 000000000000..02ddf93b82f6 --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go @@ -0,0 +1,180 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// MachinesClient is the migrate your workloads to Azure. +type MachinesClient struct { + BaseClient +} + +// NewMachinesClient creates an instance of the MachinesClient client. +func NewMachinesClient(subscriptionID string, acceptLanguage string) MachinesClient { + return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client. +func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) MachinesClient { + return MachinesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} +} + +// EnumerateMachines sends the enumerate machines request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// continuationToken - the continuation token. +func (client MachinesClient) EnumerateMachines(ctx context.Context, resourceGroupName string, migrateProjectName string, continuationToken string) (result MachineCollection, err error) { + req, err := client.EnumerateMachinesPreparer(ctx, resourceGroupName, migrateProjectName, continuationToken) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "EnumerateMachines", nil, "Failure preparing request") + return + } + + resp, err := client.EnumerateMachinesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "EnumerateMachines", resp, "Failure sending request") + return + } + + result, err = client.EnumerateMachinesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "EnumerateMachines", resp, "Failure responding to request") + } + + return +} + +// EnumerateMachinesPreparer prepares the EnumerateMachines request. +func (client MachinesClient) EnumerateMachinesPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, continuationToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["continuationToken"] = autorest.Encode("query", continuationToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Machines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnumerateMachinesSender sends the EnumerateMachines request. The method will close the +// http.Response Body if it receives an error. +func (client MachinesClient) EnumerateMachinesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// EnumerateMachinesResponder handles the response to the EnumerateMachines request. The method always +// closes the http.Response Body. +func (client MachinesClient) EnumerateMachinesResponder(resp *http.Response) (result MachineCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMachine sends the get machine request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// machineName - unique name of a machine in Azure migration hub. +func (client MachinesClient) GetMachine(ctx context.Context, resourceGroupName string, migrateProjectName string, machineName string) (result Machine, err error) { + req, err := client.GetMachinePreparer(ctx, resourceGroupName, migrateProjectName, machineName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "GetMachine", nil, "Failure preparing request") + return + } + + resp, err := client.GetMachineSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "GetMachine", resp, "Failure sending request") + return + } + + result, err = client.GetMachineResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.MachinesClient", "GetMachine", resp, "Failure responding to request") + } + + return +} + +// GetMachinePreparer prepares the GetMachine request. +func (client MachinesClient) GetMachinePreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, machineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "machineName": autorest.Encode("path", machineName), + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Machines/{machineName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMachineSender sends the GetMachine request. The method will close the +// http.Response Body if it receives an error. +func (client MachinesClient) GetMachineSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetMachineResponder handles the response to the GetMachine request. The method always +// closes the http.Response Body. +func (client MachinesClient) GetMachineResponder(resp *http.Response) (result Machine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/models.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/models.go new file mode 100644 index 000000000000..897540cc4fad --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/models.go @@ -0,0 +1,1251 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "encoding/json" + "github.com/Azure/go-autorest/autorest" +) + +// ContainerElementKind enumerates the values for container element kind. +type ContainerElementKind string + +const ( + // ActionImport ... + ActionImport ContainerElementKind = "ActionImport" + // EntitySet ... + EntitySet ContainerElementKind = "EntitySet" + // FunctionImport ... + FunctionImport ContainerElementKind = "FunctionImport" + // None ... + None ContainerElementKind = "None" + // Singleton ... + Singleton ContainerElementKind = "Singleton" +) + +// PossibleContainerElementKindValues returns an array of possible values for the ContainerElementKind const type. +func PossibleContainerElementKindValues() []ContainerElementKind { + return []ContainerElementKind{ActionImport, EntitySet, FunctionImport, None, Singleton} +} + +// Direction enumerates the values for direction. +type Direction string + +const ( + // Ascending ... + Ascending Direction = "Ascending" + // Descending ... + Descending Direction = "Descending" +) + +// PossibleDirectionValues returns an array of possible values for the Direction const type. +func PossibleDirectionValues() []Direction { + return []Direction{Ascending, Descending} +} + +// Direction1 enumerates the values for direction 1. +type Direction1 string + +const ( + // Direction1Ascending ... + Direction1Ascending Direction1 = "Ascending" + // Direction1Descending ... + Direction1Descending Direction1 = "Descending" +) + +// PossibleDirection1Values returns an array of possible values for the Direction1 const type. +func PossibleDirection1Values() []Direction1 { + return []Direction1{Direction1Ascending, Direction1Descending} +} + +// ExpressionKind enumerates the values for expression kind. +type ExpressionKind string + +const ( + // ExpressionKindAnnotationPath ... + ExpressionKindAnnotationPath ExpressionKind = "AnnotationPath" + // ExpressionKindBinaryConstant ... + ExpressionKindBinaryConstant ExpressionKind = "BinaryConstant" + // ExpressionKindBooleanConstant ... + ExpressionKindBooleanConstant ExpressionKind = "BooleanConstant" + // ExpressionKindCast ... + ExpressionKindCast ExpressionKind = "Cast" + // ExpressionKindCollection ... + ExpressionKindCollection ExpressionKind = "Collection" + // ExpressionKindDateConstant ... + ExpressionKindDateConstant ExpressionKind = "DateConstant" + // ExpressionKindDateTimeOffsetConstant ... + ExpressionKindDateTimeOffsetConstant ExpressionKind = "DateTimeOffsetConstant" + // ExpressionKindDecimalConstant ... + ExpressionKindDecimalConstant ExpressionKind = "DecimalConstant" + // ExpressionKindDurationConstant ... + ExpressionKindDurationConstant ExpressionKind = "DurationConstant" + // ExpressionKindEnumMember ... + ExpressionKindEnumMember ExpressionKind = "EnumMember" + // ExpressionKindFloatingConstant ... + ExpressionKindFloatingConstant ExpressionKind = "FloatingConstant" + // ExpressionKindFunctionApplication ... + ExpressionKindFunctionApplication ExpressionKind = "FunctionApplication" + // ExpressionKindGUIDConstant ... + ExpressionKindGUIDConstant ExpressionKind = "GuidConstant" + // ExpressionKindIf ... + ExpressionKindIf ExpressionKind = "If" + // ExpressionKindIntegerConstant ... + ExpressionKindIntegerConstant ExpressionKind = "IntegerConstant" + // ExpressionKindIsType ... + ExpressionKindIsType ExpressionKind = "IsType" + // ExpressionKindLabeled ... + ExpressionKindLabeled ExpressionKind = "Labeled" + // ExpressionKindLabeledExpressionReference ... + ExpressionKindLabeledExpressionReference ExpressionKind = "LabeledExpressionReference" + // ExpressionKindNavigationPropertyPath ... + ExpressionKindNavigationPropertyPath ExpressionKind = "NavigationPropertyPath" + // ExpressionKindNone ... + ExpressionKindNone ExpressionKind = "None" + // ExpressionKindNull ... + ExpressionKindNull ExpressionKind = "Null" + // ExpressionKindPath ... + ExpressionKindPath ExpressionKind = "Path" + // ExpressionKindPropertyPath ... + ExpressionKindPropertyPath ExpressionKind = "PropertyPath" + // ExpressionKindRecord ... + ExpressionKindRecord ExpressionKind = "Record" + // ExpressionKindStringConstant ... + ExpressionKindStringConstant ExpressionKind = "StringConstant" + // ExpressionKindTimeOfDayConstant ... + ExpressionKindTimeOfDayConstant ExpressionKind = "TimeOfDayConstant" +) + +// PossibleExpressionKindValues returns an array of possible values for the ExpressionKind const type. +func PossibleExpressionKindValues() []ExpressionKind { + return []ExpressionKind{ExpressionKindAnnotationPath, ExpressionKindBinaryConstant, ExpressionKindBooleanConstant, ExpressionKindCast, ExpressionKindCollection, ExpressionKindDateConstant, ExpressionKindDateTimeOffsetConstant, ExpressionKindDecimalConstant, ExpressionKindDurationConstant, ExpressionKindEnumMember, ExpressionKindFloatingConstant, ExpressionKindFunctionApplication, ExpressionKindGUIDConstant, ExpressionKindIf, ExpressionKindIntegerConstant, ExpressionKindIsType, ExpressionKindLabeled, ExpressionKindLabeledExpressionReference, ExpressionKindNavigationPropertyPath, ExpressionKindNone, ExpressionKindNull, ExpressionKindPath, ExpressionKindPropertyPath, ExpressionKindRecord, ExpressionKindStringConstant, ExpressionKindTimeOfDayConstant} +} + +// ExpressionKind1 enumerates the values for expression kind 1. +type ExpressionKind1 string + +const ( + // ExpressionKind1AnnotationPath ... + ExpressionKind1AnnotationPath ExpressionKind1 = "AnnotationPath" + // ExpressionKind1BinaryConstant ... + ExpressionKind1BinaryConstant ExpressionKind1 = "BinaryConstant" + // ExpressionKind1BooleanConstant ... + ExpressionKind1BooleanConstant ExpressionKind1 = "BooleanConstant" + // ExpressionKind1Cast ... + ExpressionKind1Cast ExpressionKind1 = "Cast" + // ExpressionKind1Collection ... + ExpressionKind1Collection ExpressionKind1 = "Collection" + // ExpressionKind1DateConstant ... + ExpressionKind1DateConstant ExpressionKind1 = "DateConstant" + // ExpressionKind1DateTimeOffsetConstant ... + ExpressionKind1DateTimeOffsetConstant ExpressionKind1 = "DateTimeOffsetConstant" + // ExpressionKind1DecimalConstant ... + ExpressionKind1DecimalConstant ExpressionKind1 = "DecimalConstant" + // ExpressionKind1DurationConstant ... + ExpressionKind1DurationConstant ExpressionKind1 = "DurationConstant" + // ExpressionKind1EnumMember ... + ExpressionKind1EnumMember ExpressionKind1 = "EnumMember" + // ExpressionKind1FloatingConstant ... + ExpressionKind1FloatingConstant ExpressionKind1 = "FloatingConstant" + // ExpressionKind1FunctionApplication ... + ExpressionKind1FunctionApplication ExpressionKind1 = "FunctionApplication" + // ExpressionKind1GUIDConstant ... + ExpressionKind1GUIDConstant ExpressionKind1 = "GuidConstant" + // ExpressionKind1If ... + ExpressionKind1If ExpressionKind1 = "If" + // ExpressionKind1IntegerConstant ... + ExpressionKind1IntegerConstant ExpressionKind1 = "IntegerConstant" + // ExpressionKind1IsType ... + ExpressionKind1IsType ExpressionKind1 = "IsType" + // ExpressionKind1Labeled ... + ExpressionKind1Labeled ExpressionKind1 = "Labeled" + // ExpressionKind1LabeledExpressionReference ... + ExpressionKind1LabeledExpressionReference ExpressionKind1 = "LabeledExpressionReference" + // ExpressionKind1NavigationPropertyPath ... + ExpressionKind1NavigationPropertyPath ExpressionKind1 = "NavigationPropertyPath" + // ExpressionKind1None ... + ExpressionKind1None ExpressionKind1 = "None" + // ExpressionKind1Null ... + ExpressionKind1Null ExpressionKind1 = "Null" + // ExpressionKind1Path ... + ExpressionKind1Path ExpressionKind1 = "Path" + // ExpressionKind1PropertyPath ... + ExpressionKind1PropertyPath ExpressionKind1 = "PropertyPath" + // ExpressionKind1Record ... + ExpressionKind1Record ExpressionKind1 = "Record" + // ExpressionKind1StringConstant ... + ExpressionKind1StringConstant ExpressionKind1 = "StringConstant" + // ExpressionKind1TimeOfDayConstant ... + ExpressionKind1TimeOfDayConstant ExpressionKind1 = "TimeOfDayConstant" +) + +// PossibleExpressionKind1Values returns an array of possible values for the ExpressionKind1 const type. +func PossibleExpressionKind1Values() []ExpressionKind1 { + return []ExpressionKind1{ExpressionKind1AnnotationPath, ExpressionKind1BinaryConstant, ExpressionKind1BooleanConstant, ExpressionKind1Cast, ExpressionKind1Collection, ExpressionKind1DateConstant, ExpressionKind1DateTimeOffsetConstant, ExpressionKind1DecimalConstant, ExpressionKind1DurationConstant, ExpressionKind1EnumMember, ExpressionKind1FloatingConstant, ExpressionKind1FunctionApplication, ExpressionKind1GUIDConstant, ExpressionKind1If, ExpressionKind1IntegerConstant, ExpressionKind1IsType, ExpressionKind1Labeled, ExpressionKind1LabeledExpressionReference, ExpressionKind1NavigationPropertyPath, ExpressionKind1None, ExpressionKind1Null, ExpressionKind1Path, ExpressionKind1PropertyPath, ExpressionKind1Record, ExpressionKind1StringConstant, ExpressionKind1TimeOfDayConstant} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // Aggregate ... + Aggregate Kind = "Aggregate" + // Compute ... + Compute Kind = "Compute" + // Filter ... + Filter Kind = "Filter" + // GroupBy ... + GroupBy Kind = "GroupBy" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{Aggregate, Compute, Filter, GroupBy} +} + +// Kind1 enumerates the values for kind 1. +type Kind1 string + +const ( + // Kind1AggregatedCollectionPropertyNode ... + Kind1AggregatedCollectionPropertyNode Kind1 = "AggregatedCollectionPropertyNode" + // Kind1All ... + Kind1All Kind1 = "All" + // Kind1Any ... + Kind1Any Kind1 = "Any" + // Kind1BinaryOperator ... + Kind1BinaryOperator Kind1 = "BinaryOperator" + // Kind1CollectionComplexNode ... + Kind1CollectionComplexNode Kind1 = "CollectionComplexNode" + // Kind1CollectionConstant ... + Kind1CollectionConstant Kind1 = "CollectionConstant" + // Kind1CollectionFunctionCall ... + Kind1CollectionFunctionCall Kind1 = "CollectionFunctionCall" + // Kind1CollectionNavigationNode ... + Kind1CollectionNavigationNode Kind1 = "CollectionNavigationNode" + // Kind1CollectionOpenPropertyAccess ... + Kind1CollectionOpenPropertyAccess Kind1 = "CollectionOpenPropertyAccess" + // Kind1CollectionPropertyAccess ... + Kind1CollectionPropertyAccess Kind1 = "CollectionPropertyAccess" + // Kind1CollectionPropertyNode ... + Kind1CollectionPropertyNode Kind1 = "CollectionPropertyNode" + // Kind1CollectionResourceCast ... + Kind1CollectionResourceCast Kind1 = "CollectionResourceCast" + // Kind1CollectionResourceFunctionCall ... + Kind1CollectionResourceFunctionCall Kind1 = "CollectionResourceFunctionCall" + // Kind1Constant ... + Kind1Constant Kind1 = "Constant" + // Kind1Convert ... + Kind1Convert Kind1 = "Convert" + // Kind1Count ... + Kind1Count Kind1 = "Count" + // Kind1EntitySet ... + Kind1EntitySet Kind1 = "EntitySet" + // Kind1In ... + Kind1In Kind1 = "In" + // Kind1KeyLookup ... + Kind1KeyLookup Kind1 = "KeyLookup" + // Kind1NamedFunctionParameter ... + Kind1NamedFunctionParameter Kind1 = "NamedFunctionParameter" + // Kind1None ... + Kind1None Kind1 = "None" + // Kind1NonResourceRangeVariableReference ... + Kind1NonResourceRangeVariableReference Kind1 = "NonResourceRangeVariableReference" + // Kind1ParameterAlias ... + Kind1ParameterAlias Kind1 = "ParameterAlias" + // Kind1ResourceRangeVariableReference ... + Kind1ResourceRangeVariableReference Kind1 = "ResourceRangeVariableReference" + // Kind1SearchTerm ... + Kind1SearchTerm Kind1 = "SearchTerm" + // Kind1SingleComplexNode ... + Kind1SingleComplexNode Kind1 = "SingleComplexNode" + // Kind1SingleNavigationNode ... + Kind1SingleNavigationNode Kind1 = "SingleNavigationNode" + // Kind1SingleResourceCast ... + Kind1SingleResourceCast Kind1 = "SingleResourceCast" + // Kind1SingleResourceFunctionCall ... + Kind1SingleResourceFunctionCall Kind1 = "SingleResourceFunctionCall" + // Kind1SingleValueCast ... + Kind1SingleValueCast Kind1 = "SingleValueCast" + // Kind1SingleValueFunctionCall ... + Kind1SingleValueFunctionCall Kind1 = "SingleValueFunctionCall" + // Kind1SingleValueOpenPropertyAccess ... + Kind1SingleValueOpenPropertyAccess Kind1 = "SingleValueOpenPropertyAccess" + // Kind1SingleValuePropertyAccess ... + Kind1SingleValuePropertyAccess Kind1 = "SingleValuePropertyAccess" + // Kind1UnaryOperator ... + Kind1UnaryOperator Kind1 = "UnaryOperator" +) + +// PossibleKind1Values returns an array of possible values for the Kind1 const type. +func PossibleKind1Values() []Kind1 { + return []Kind1{Kind1AggregatedCollectionPropertyNode, Kind1All, Kind1Any, Kind1BinaryOperator, Kind1CollectionComplexNode, Kind1CollectionConstant, Kind1CollectionFunctionCall, Kind1CollectionNavigationNode, Kind1CollectionOpenPropertyAccess, Kind1CollectionPropertyAccess, Kind1CollectionPropertyNode, Kind1CollectionResourceCast, Kind1CollectionResourceFunctionCall, Kind1Constant, Kind1Convert, Kind1Count, Kind1EntitySet, Kind1In, Kind1KeyLookup, Kind1NamedFunctionParameter, Kind1None, Kind1NonResourceRangeVariableReference, Kind1ParameterAlias, Kind1ResourceRangeVariableReference, Kind1SearchTerm, Kind1SingleComplexNode, Kind1SingleNavigationNode, Kind1SingleResourceCast, Kind1SingleResourceFunctionCall, Kind1SingleValueCast, Kind1SingleValueFunctionCall, Kind1SingleValueOpenPropertyAccess, Kind1SingleValuePropertyAccess, Kind1UnaryOperator} +} + +// OnDelete enumerates the values for on delete. +type OnDelete string + +const ( + // OnDeleteCascade ... + OnDeleteCascade OnDelete = "Cascade" + // OnDeleteNone ... + OnDeleteNone OnDelete = "None" +) + +// PossibleOnDeleteValues returns an array of possible values for the OnDelete const type. +func PossibleOnDeleteValues() []OnDelete { + return []OnDelete{OnDeleteCascade, OnDeleteNone} +} + +// PropertyKind enumerates the values for property kind. +type PropertyKind string + +const ( + // PropertyKindNavigation ... + PropertyKindNavigation PropertyKind = "Navigation" + // PropertyKindNone ... + PropertyKindNone PropertyKind = "None" + // PropertyKindStructural ... + PropertyKindStructural PropertyKind = "Structural" +) + +// PossiblePropertyKindValues returns an array of possible values for the PropertyKind const type. +func PossiblePropertyKindValues() []PropertyKind { + return []PropertyKind{PropertyKindNavigation, PropertyKindNone, PropertyKindStructural} +} + +// PropertyKind1 enumerates the values for property kind 1. +type PropertyKind1 string + +const ( + // PropertyKind1Navigation ... + PropertyKind1Navigation PropertyKind1 = "Navigation" + // PropertyKind1None ... + PropertyKind1None PropertyKind1 = "None" + // PropertyKind1Structural ... + PropertyKind1Structural PropertyKind1 = "Structural" +) + +// PossiblePropertyKind1Values returns an array of possible values for the PropertyKind1 const type. +func PossiblePropertyKind1Values() []PropertyKind1 { + return []PropertyKind1{PropertyKind1Navigation, PropertyKind1None, PropertyKind1Structural} +} + +// PropertyKind2 enumerates the values for property kind 2. +type PropertyKind2 string + +const ( + // PropertyKind2Navigation ... + PropertyKind2Navigation PropertyKind2 = "Navigation" + // PropertyKind2None ... + PropertyKind2None PropertyKind2 = "None" + // PropertyKind2Structural ... + PropertyKind2Structural PropertyKind2 = "Structural" +) + +// PossiblePropertyKind2Values returns an array of possible values for the PropertyKind2 const type. +func PossiblePropertyKind2Values() []PropertyKind2 { + return []PropertyKind2{PropertyKind2Navigation, PropertyKind2None, PropertyKind2Structural} +} + +// SchemaElementKind enumerates the values for schema element kind. +type SchemaElementKind string + +const ( + // SchemaElementKindAction ... + SchemaElementKindAction SchemaElementKind = "Action" + // SchemaElementKindEntityContainer ... + SchemaElementKindEntityContainer SchemaElementKind = "EntityContainer" + // SchemaElementKindFunction ... + SchemaElementKindFunction SchemaElementKind = "Function" + // SchemaElementKindNone ... + SchemaElementKindNone SchemaElementKind = "None" + // SchemaElementKindTerm ... + SchemaElementKindTerm SchemaElementKind = "Term" + // SchemaElementKindTypeDefinition ... + SchemaElementKindTypeDefinition SchemaElementKind = "TypeDefinition" +) + +// PossibleSchemaElementKindValues returns an array of possible values for the SchemaElementKind const type. +func PossibleSchemaElementKindValues() []SchemaElementKind { + return []SchemaElementKind{SchemaElementKindAction, SchemaElementKindEntityContainer, SchemaElementKindFunction, SchemaElementKindNone, SchemaElementKindTerm, SchemaElementKindTypeDefinition} +} + +// SchemaElementKind1 enumerates the values for schema element kind 1. +type SchemaElementKind1 string + +const ( + // SchemaElementKind1Action ... + SchemaElementKind1Action SchemaElementKind1 = "Action" + // SchemaElementKind1EntityContainer ... + SchemaElementKind1EntityContainer SchemaElementKind1 = "EntityContainer" + // SchemaElementKind1Function ... + SchemaElementKind1Function SchemaElementKind1 = "Function" + // SchemaElementKind1None ... + SchemaElementKind1None SchemaElementKind1 = "None" + // SchemaElementKind1Term ... + SchemaElementKind1Term SchemaElementKind1 = "Term" + // SchemaElementKind1TypeDefinition ... + SchemaElementKind1TypeDefinition SchemaElementKind1 = "TypeDefinition" +) + +// PossibleSchemaElementKind1Values returns an array of possible values for the SchemaElementKind1 const type. +func PossibleSchemaElementKind1Values() []SchemaElementKind1 { + return []SchemaElementKind1{SchemaElementKind1Action, SchemaElementKind1EntityContainer, SchemaElementKind1Function, SchemaElementKind1None, SchemaElementKind1Term, SchemaElementKind1TypeDefinition} +} + +// SchemaElementKind2 enumerates the values for schema element kind 2. +type SchemaElementKind2 string + +const ( + // SchemaElementKind2Action ... + SchemaElementKind2Action SchemaElementKind2 = "Action" + // SchemaElementKind2EntityContainer ... + SchemaElementKind2EntityContainer SchemaElementKind2 = "EntityContainer" + // SchemaElementKind2Function ... + SchemaElementKind2Function SchemaElementKind2 = "Function" + // SchemaElementKind2None ... + SchemaElementKind2None SchemaElementKind2 = "None" + // SchemaElementKind2Term ... + SchemaElementKind2Term SchemaElementKind2 = "Term" + // SchemaElementKind2TypeDefinition ... + SchemaElementKind2TypeDefinition SchemaElementKind2 = "TypeDefinition" +) + +// PossibleSchemaElementKind2Values returns an array of possible values for the SchemaElementKind2 const type. +func PossibleSchemaElementKind2Values() []SchemaElementKind2 { + return []SchemaElementKind2{SchemaElementKind2Action, SchemaElementKind2EntityContainer, SchemaElementKind2Function, SchemaElementKind2None, SchemaElementKind2Term, SchemaElementKind2TypeDefinition} +} + +// TypeKind enumerates the values for type kind. +type TypeKind string + +const ( + // TypeKindCollection ... + TypeKindCollection TypeKind = "Collection" + // TypeKindComplex ... + TypeKindComplex TypeKind = "Complex" + // TypeKindEntity ... + TypeKindEntity TypeKind = "Entity" + // TypeKindEntityReference ... + TypeKindEntityReference TypeKind = "EntityReference" + // TypeKindEnum ... + TypeKindEnum TypeKind = "Enum" + // TypeKindNone ... + TypeKindNone TypeKind = "None" + // TypeKindPath ... + TypeKindPath TypeKind = "Path" + // TypeKindPrimitive ... + TypeKindPrimitive TypeKind = "Primitive" + // TypeKindTypeDefinition ... + TypeKindTypeDefinition TypeKind = "TypeDefinition" + // TypeKindUntyped ... + TypeKindUntyped TypeKind = "Untyped" +) + +// PossibleTypeKindValues returns an array of possible values for the TypeKind const type. +func PossibleTypeKindValues() []TypeKind { + return []TypeKind{TypeKindCollection, TypeKindComplex, TypeKindEntity, TypeKindEntityReference, TypeKindEnum, TypeKindNone, TypeKindPath, TypeKindPrimitive, TypeKindTypeDefinition, TypeKindUntyped} +} + +// TypeKind1 enumerates the values for type kind 1. +type TypeKind1 string + +const ( + // TypeKind1Collection ... + TypeKind1Collection TypeKind1 = "Collection" + // TypeKind1Complex ... + TypeKind1Complex TypeKind1 = "Complex" + // TypeKind1Entity ... + TypeKind1Entity TypeKind1 = "Entity" + // TypeKind1EntityReference ... + TypeKind1EntityReference TypeKind1 = "EntityReference" + // TypeKind1Enum ... + TypeKind1Enum TypeKind1 = "Enum" + // TypeKind1None ... + TypeKind1None TypeKind1 = "None" + // TypeKind1Path ... + TypeKind1Path TypeKind1 = "Path" + // TypeKind1Primitive ... + TypeKind1Primitive TypeKind1 = "Primitive" + // TypeKind1TypeDefinition ... + TypeKind1TypeDefinition TypeKind1 = "TypeDefinition" + // TypeKind1Untyped ... + TypeKind1Untyped TypeKind1 = "Untyped" +) + +// PossibleTypeKind1Values returns an array of possible values for the TypeKind1 const type. +func PossibleTypeKind1Values() []TypeKind1 { + return []TypeKind1{TypeKind1Collection, TypeKind1Complex, TypeKind1Entity, TypeKind1EntityReference, TypeKind1Enum, TypeKind1None, TypeKind1Path, TypeKind1Primitive, TypeKind1TypeDefinition, TypeKind1Untyped} +} + +// ApplyClause ... +type ApplyClause struct { + Transformations *[]TransformationNode `json:"transformations,omitempty"` +} + +// ApplyQueryOption ... +type ApplyQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + ResultClrType *string `json:"resultClrType,omitempty"` + ApplyClause *ApplyClause `json:"applyClause,omitempty"` + RawValue *string `json:"rawValue,omitempty"` +} + +// AssessmentDetails assessment properties that can be shared by various publishers. +type AssessmentDetails struct { + // AssessmentID - Gets or sets the id of the assessment done on the machine. + AssessmentID *string `json:"assessmentId,omitempty"` + // TargetVMSize - Gets or sets the target VM size. + TargetVMSize *string `json:"targetVMSize,omitempty"` + // TargetVMLocation - Gets or sets the target VM location. + TargetVMLocation *string `json:"targetVMLocation,omitempty"` + // TargetStorageType - Gets or sets the target storage type. + TargetStorageType map[string]*string `json:"targetStorageType"` + // EnqueueTime - Gets or sets the time the message was enqueued. + EnqueueTime *string `json:"enqueueTime,omitempty"` + // SolutionName - Gets or sets the name of the solution that sent the data. + SolutionName *string `json:"solutionName,omitempty"` + // MachineID - Gets or sets the unique identifier of the machine. + MachineID *string `json:"machineId,omitempty"` + // MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM). + MachineManagerID *string `json:"machineManagerId,omitempty"` + // MachineName - Gets or sets the name of the machine. + MachineName *string `json:"machineName,omitempty"` + // ExtendedInfo - Gets or sets the ISV specific extended information. + ExtendedInfo map[string]*string `json:"extendedInfo"` +} + +// MarshalJSON is the custom marshaler for AssessmentDetails. +func (ad AssessmentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ad.AssessmentID != nil { + objectMap["assessmentId"] = ad.AssessmentID + } + if ad.TargetVMSize != nil { + objectMap["targetVMSize"] = ad.TargetVMSize + } + if ad.TargetVMLocation != nil { + objectMap["targetVMLocation"] = ad.TargetVMLocation + } + if ad.TargetStorageType != nil { + objectMap["targetStorageType"] = ad.TargetStorageType + } + if ad.EnqueueTime != nil { + objectMap["enqueueTime"] = ad.EnqueueTime + } + if ad.SolutionName != nil { + objectMap["solutionName"] = ad.SolutionName + } + if ad.MachineID != nil { + objectMap["machineId"] = ad.MachineID + } + if ad.MachineManagerID != nil { + objectMap["machineManagerId"] = ad.MachineManagerID + } + if ad.MachineName != nil { + objectMap["machineName"] = ad.MachineName + } + if ad.ExtendedInfo != nil { + objectMap["extendedInfo"] = ad.ExtendedInfo + } + return json.Marshal(objectMap) +} + +// CountQueryOption ... +type CountQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + RawValue *string `json:"rawValue,omitempty"` + Value *bool `json:"value,omitempty"` + Validator interface{} `json:"validator,omitempty"` +} + +// DefaultQuerySettings ... +type DefaultQuerySettings struct { + EnableExpand *bool `json:"enableExpand,omitempty"` + EnableSelect *bool `json:"enableSelect,omitempty"` + EnableCount *bool `json:"enableCount,omitempty"` + EnableOrderBy *bool `json:"enableOrderBy,omitempty"` + EnableFilter *bool `json:"enableFilter,omitempty"` + MaxTop *int32 `json:"maxTop,omitempty"` +} + +// DiscoveryDetails discovery properties that can be published by various ISVs. +type DiscoveryDetails struct { + // OsType - Gets or sets the OS type. + OsType *string `json:"osType,omitempty"` + // OsName - Gets or sets the OS name. + OsName *string `json:"osName,omitempty"` + // OsVersion - Gets or sets the OS version. + OsVersion *string `json:"osVersion,omitempty"` + // EnqueueTime - Gets or sets the time the message was enqueued. + EnqueueTime *string `json:"enqueueTime,omitempty"` + // SolutionName - Gets or sets the name of the solution that sent the data. + SolutionName *string `json:"solutionName,omitempty"` + // MachineID - Gets or sets the unique identifier of the machine. + MachineID *string `json:"machineId,omitempty"` + // MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM). + MachineManagerID *string `json:"machineManagerId,omitempty"` + // MachineName - Gets or sets the name of the machine. + MachineName *string `json:"machineName,omitempty"` + // ExtendedInfo - Gets or sets the ISV specific extended information. + ExtendedInfo map[string]*string `json:"extendedInfo"` +} + +// MarshalJSON is the custom marshaler for DiscoveryDetails. +func (dd DiscoveryDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dd.OsType != nil { + objectMap["osType"] = dd.OsType + } + if dd.OsName != nil { + objectMap["osName"] = dd.OsName + } + if dd.OsVersion != nil { + objectMap["osVersion"] = dd.OsVersion + } + if dd.EnqueueTime != nil { + objectMap["enqueueTime"] = dd.EnqueueTime + } + if dd.SolutionName != nil { + objectMap["solutionName"] = dd.SolutionName + } + if dd.MachineID != nil { + objectMap["machineId"] = dd.MachineID + } + if dd.MachineManagerID != nil { + objectMap["machineManagerId"] = dd.MachineManagerID + } + if dd.MachineName != nil { + objectMap["machineName"] = dd.MachineName + } + if dd.ExtendedInfo != nil { + objectMap["extendedInfo"] = dd.ExtendedInfo + } + return json.Marshal(objectMap) +} + +// EdmReferentialConstraintPropertyPair ... +type EdmReferentialConstraintPropertyPair struct { + DependentProperty *IEdmStructuralProperty `json:"dependentProperty,omitempty"` + PrincipalProperty *IEdmStructuralProperty `json:"principalProperty,omitempty"` +} + +// Error error REST resource. +type Error struct { + autorest.Response `json:"-"` + // ID - Gets or sets the relative URL to get to this REST resource. + ID *string `json:"id,omitempty"` + // Name - Gets or sets the name of this REST resource. + Name *string `json:"name,omitempty"` + // Type - Gets the type of this REST resource. + Type *string `json:"type,omitempty"` + // Properties - Gets or sets the properties of the error. + Properties *ErrorProperties `json:"properties,omitempty"` +} + +// ErrorCollection collection of errors. +type ErrorCollection struct { + autorest.Response `json:"-"` + // Value - Gets or sets the machines. + Value *[]Error `json:"value,omitempty"` + // NextLink - Gets or sets the value of nextLink. + NextLink *string `json:"nextLink,omitempty"` +} + +// ErrorProperties properties of the error resource. +type ErrorProperties struct { + // ErrorCode - Gets or sets the error code. + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - Gets or sets the error message. + ErrorMessage *string `json:"errorMessage,omitempty"` + // Recommendation - Gets or sets the recommendation for the error. + Recommendation *string `json:"recommendation,omitempty"` + // PossibleCauses - Gets or sets the possible causes for the error. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // Solution - Gets or sets the solution for which the error is being reported. + Solution *string `json:"solution,omitempty"` + // Machine - Gets or sets the machine for which the error is being reported. + Machine *string `json:"machine,omitempty"` +} + +// FilterClause ... +type FilterClause struct { + Expression *SingleValueNode `json:"expression,omitempty"` + RangeVariable *RangeVariable `json:"rangeVariable,omitempty"` + ItemType *IEdmTypeReference `json:"itemType,omitempty"` +} + +// FilterQueryOption ... +type FilterQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + Validator interface{} `json:"validator,omitempty"` + FilterClause *FilterClause `json:"filterClause,omitempty"` + RawValue *string `json:"rawValue,omitempty"` +} + +// GoalSummary class representing the summary object for goal. +type GoalSummary struct { + // DiscoveredCount - Gets or sets the count of entities discovered. + DiscoveredCount *int32 `json:"discoveredCount,omitempty"` + // AssessedCount - Gets or sets the count of entities assessed. + AssessedCount *int32 `json:"assessedCount,omitempty"` + // ReplicatingCount - Gets or sets the count of entities being replicated. + ReplicatingCount *int32 `json:"replicatingCount,omitempty"` + // MigratedCount - Gets or sets the count of entities migrated. + MigratedCount *int32 `json:"migratedCount,omitempty"` +} + +// IEdmEntityContainer ... +type IEdmEntityContainer struct { + Elements *[]IEdmEntityContainerElement `json:"elements,omitempty"` + // SchemaElementKind - Possible values include: 'SchemaElementKind2None', 'SchemaElementKind2TypeDefinition', 'SchemaElementKind2Term', 'SchemaElementKind2Action', 'SchemaElementKind2EntityContainer', 'SchemaElementKind2Function' + SchemaElementKind SchemaElementKind2 `json:"schemaElementKind,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmEntityContainerElement ... +type IEdmEntityContainerElement struct { + // ContainerElementKind - Possible values include: 'None', 'EntitySet', 'ActionImport', 'FunctionImport', 'Singleton' + ContainerElementKind ContainerElementKind `json:"containerElementKind,omitempty"` + Container *IEdmEntityContainer `json:"container,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmExpression ... +type IEdmExpression struct { + // ExpressionKind - Possible values include: 'ExpressionKindNone', 'ExpressionKindBinaryConstant', 'ExpressionKindBooleanConstant', 'ExpressionKindDateTimeOffsetConstant', 'ExpressionKindDecimalConstant', 'ExpressionKindFloatingConstant', 'ExpressionKindGUIDConstant', 'ExpressionKindIntegerConstant', 'ExpressionKindStringConstant', 'ExpressionKindDurationConstant', 'ExpressionKindNull', 'ExpressionKindRecord', 'ExpressionKindCollection', 'ExpressionKindPath', 'ExpressionKindIf', 'ExpressionKindCast', 'ExpressionKindIsType', 'ExpressionKindFunctionApplication', 'ExpressionKindLabeledExpressionReference', 'ExpressionKindLabeled', 'ExpressionKindPropertyPath', 'ExpressionKindNavigationPropertyPath', 'ExpressionKindDateConstant', 'ExpressionKindTimeOfDayConstant', 'ExpressionKindEnumMember', 'ExpressionKindAnnotationPath' + ExpressionKind ExpressionKind `json:"expressionKind,omitempty"` +} + +// IEdmModel ... +type IEdmModel struct { + SchemaElements *[]IEdmSchemaElement `json:"schemaElements,omitempty"` + VocabularyAnnotations *[]IEdmVocabularyAnnotation `json:"vocabularyAnnotations,omitempty"` + ReferencedModels *[]IEdmModel `json:"referencedModels,omitempty"` + DeclaredNamespaces *[]string `json:"declaredNamespaces,omitempty"` + DirectValueAnnotationsManager interface{} `json:"directValueAnnotationsManager,omitempty"` + EntityContainer *IEdmEntityContainer `json:"entityContainer,omitempty"` +} + +// IEdmNavigationProperty ... +type IEdmNavigationProperty struct { + Partner *IEdmNavigationProperty `json:"partner,omitempty"` + // OnDelete - Possible values include: 'OnDeleteNone', 'OnDeleteCascade' + OnDelete OnDelete `json:"onDelete,omitempty"` + ContainsTarget *bool `json:"containsTarget,omitempty"` + ReferentialConstraint *IEdmReferentialConstraint `json:"referentialConstraint,omitempty"` + // PropertyKind - Possible values include: 'PropertyKind2None', 'PropertyKind2Structural', 'PropertyKind2Navigation' + PropertyKind PropertyKind2 `json:"propertyKind,omitempty"` + Type *IEdmTypeReference `json:"type,omitempty"` + DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmNavigationPropertyBinding ... +type IEdmNavigationPropertyBinding struct { + NavigationProperty *IEdmNavigationProperty `json:"navigationProperty,omitempty"` + Target *IEdmNavigationSource `json:"target,omitempty"` + Path *IEdmPathExpression `json:"path,omitempty"` +} + +// IEdmNavigationSource ... +type IEdmNavigationSource struct { + NavigationPropertyBindings *[]IEdmNavigationPropertyBinding `json:"navigationPropertyBindings,omitempty"` + Path *IEdmPathExpression `json:"path,omitempty"` + Type *IEdmType `json:"type,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmPathExpression ... +type IEdmPathExpression struct { + PathSegments *[]string `json:"pathSegments,omitempty"` + Path *string `json:"path,omitempty"` + // ExpressionKind - Possible values include: 'ExpressionKind1None', 'ExpressionKind1BinaryConstant', 'ExpressionKind1BooleanConstant', 'ExpressionKind1DateTimeOffsetConstant', 'ExpressionKind1DecimalConstant', 'ExpressionKind1FloatingConstant', 'ExpressionKind1GUIDConstant', 'ExpressionKind1IntegerConstant', 'ExpressionKind1StringConstant', 'ExpressionKind1DurationConstant', 'ExpressionKind1Null', 'ExpressionKind1Record', 'ExpressionKind1Collection', 'ExpressionKind1Path', 'ExpressionKind1If', 'ExpressionKind1Cast', 'ExpressionKind1IsType', 'ExpressionKind1FunctionApplication', 'ExpressionKind1LabeledExpressionReference', 'ExpressionKind1Labeled', 'ExpressionKind1PropertyPath', 'ExpressionKind1NavigationPropertyPath', 'ExpressionKind1DateConstant', 'ExpressionKind1TimeOfDayConstant', 'ExpressionKind1EnumMember', 'ExpressionKind1AnnotationPath' + ExpressionKind ExpressionKind1 `json:"expressionKind,omitempty"` +} + +// IEdmProperty ... +type IEdmProperty struct { + // PropertyKind - Possible values include: 'PropertyKindNone', 'PropertyKindStructural', 'PropertyKindNavigation' + PropertyKind PropertyKind `json:"propertyKind,omitempty"` + Type *IEdmTypeReference `json:"type,omitempty"` + DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmReferentialConstraint ... +type IEdmReferentialConstraint struct { + PropertyPairs *[]EdmReferentialConstraintPropertyPair `json:"propertyPairs,omitempty"` +} + +// IEdmSchemaElement ... +type IEdmSchemaElement struct { + // SchemaElementKind - Possible values include: 'SchemaElementKindNone', 'SchemaElementKindTypeDefinition', 'SchemaElementKindTerm', 'SchemaElementKindAction', 'SchemaElementKindEntityContainer', 'SchemaElementKindFunction' + SchemaElementKind SchemaElementKind `json:"schemaElementKind,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmStructuralProperty ... +type IEdmStructuralProperty struct { + DefaultValueString *string `json:"defaultValueString,omitempty"` + // PropertyKind - Possible values include: 'PropertyKind1None', 'PropertyKind1Structural', 'PropertyKind1Navigation' + PropertyKind PropertyKind1 `json:"propertyKind,omitempty"` + Type *IEdmTypeReference `json:"type,omitempty"` + DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmStructuredType ... +type IEdmStructuredType struct { + IsAbstract *bool `json:"isAbstract,omitempty"` + IsOpen *bool `json:"isOpen,omitempty"` + BaseType *IEdmStructuredType `json:"baseType,omitempty"` + DeclaredProperties *[]IEdmProperty `json:"declaredProperties,omitempty"` + // TypeKind - Possible values include: 'TypeKind1None', 'TypeKind1Primitive', 'TypeKind1Entity', 'TypeKind1Complex', 'TypeKind1Collection', 'TypeKind1EntityReference', 'TypeKind1Enum', 'TypeKind1TypeDefinition', 'TypeKind1Untyped', 'TypeKind1Path' + TypeKind TypeKind1 `json:"typeKind,omitempty"` +} + +// IEdmTerm ... +type IEdmTerm struct { + Type *IEdmTypeReference `json:"type,omitempty"` + AppliesTo *string `json:"appliesTo,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty"` + // SchemaElementKind - Possible values include: 'SchemaElementKind1None', 'SchemaElementKind1TypeDefinition', 'SchemaElementKind1Term', 'SchemaElementKind1Action', 'SchemaElementKind1EntityContainer', 'SchemaElementKind1Function' + SchemaElementKind SchemaElementKind1 `json:"schemaElementKind,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` +} + +// IEdmType ... +type IEdmType struct { + // TypeKind - Possible values include: 'TypeKindNone', 'TypeKindPrimitive', 'TypeKindEntity', 'TypeKindComplex', 'TypeKindCollection', 'TypeKindEntityReference', 'TypeKindEnum', 'TypeKindTypeDefinition', 'TypeKindUntyped', 'TypeKindPath' + TypeKind TypeKind `json:"typeKind,omitempty"` +} + +// IEdmTypeReference ... +type IEdmTypeReference struct { + IsNullable *bool `json:"isNullable,omitempty"` + Definition *IEdmType `json:"definition,omitempty"` +} + +// IEdmVocabularyAnnotation ... +type IEdmVocabularyAnnotation struct { + Qualifier *string `json:"qualifier,omitempty"` + Term *IEdmTerm `json:"term,omitempty"` + Target interface{} `json:"target,omitempty"` + Value *IEdmExpression `json:"value,omitempty"` +} + +// Machine machine REST resource. +type Machine struct { + autorest.Response `json:"-"` + // ID - Gets or sets the relative URL to get to this REST resource. + ID *string `json:"id,omitempty"` + // Name - Gets or sets the name of this REST resource. + Name *string `json:"name,omitempty"` + // Type - Gets the type of this REST resource. + Type *string `json:"type,omitempty"` + // Properties - Gets or sets the properties of the machine. + Properties *MachineProperties `json:"properties,omitempty"` +} + +// MachineCollection collection of machines. +type MachineCollection struct { + autorest.Response `json:"-"` + // Value - Gets or sets the machines. + Value *[]Machine `json:"value,omitempty"` + // NextLink - Gets or sets the value of nextLink. + NextLink *string `json:"nextLink,omitempty"` +} + +// MachineProperties properties of the machine resource. +type MachineProperties struct { + // DiscoveryData - Gets or sets the discovery details of the machine published by various sources. + DiscoveryData *[]DiscoveryDetails `json:"discoveryData,omitempty"` + // AssessmentData - Gets or sets the assessment details of the machine published by various sources. + AssessmentData *[]AssessmentDetails `json:"assessmentData,omitempty"` + // MigrationData - Gets or sets the migration details of the machine published by various sources. + MigrationData *[]MigrationDetails `json:"migrationData,omitempty"` +} + +// MigrationDetails migration properties that can be shared by various publishers. +type MigrationDetails struct { + // MigrationPhase - Gets or sets the phase of migration of the machine. + MigrationPhase *string `json:"migrationPhase,omitempty"` + // MigrationTested - Gets or sets a value indicating whether migration was tested on the machine. + MigrationTested *bool `json:"migrationTested,omitempty"` + // ReplicationProgressPercentage - Gets or sets the progress percentage of migration on the machine. + ReplicationProgressPercentage *int32 `json:"replicationProgressPercentage,omitempty"` + // TargetVMArmID - Gets or sets the ARM id the migrated VM. + TargetVMArmID *string `json:"targetVMArmId,omitempty"` + // EnqueueTime - Gets or sets the time the message was enqueued. + EnqueueTime *string `json:"enqueueTime,omitempty"` + // SolutionName - Gets or sets the name of the solution that sent the data. + SolutionName *string `json:"solutionName,omitempty"` + // MachineID - Gets or sets the unique identifier of the machine. + MachineID *string `json:"machineId,omitempty"` + // MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM). + MachineManagerID *string `json:"machineManagerId,omitempty"` + // MachineName - Gets or sets the name of the machine. + MachineName *string `json:"machineName,omitempty"` + // ExtendedInfo - Gets or sets the ISV specific extended information. + ExtendedInfo map[string]*string `json:"extendedInfo"` +} + +// MarshalJSON is the custom marshaler for MigrationDetails. +func (md MigrationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if md.MigrationPhase != nil { + objectMap["migrationPhase"] = md.MigrationPhase + } + if md.MigrationTested != nil { + objectMap["migrationTested"] = md.MigrationTested + } + if md.ReplicationProgressPercentage != nil { + objectMap["replicationProgressPercentage"] = md.ReplicationProgressPercentage + } + if md.TargetVMArmID != nil { + objectMap["targetVMArmId"] = md.TargetVMArmID + } + if md.EnqueueTime != nil { + objectMap["enqueueTime"] = md.EnqueueTime + } + if md.SolutionName != nil { + objectMap["solutionName"] = md.SolutionName + } + if md.MachineID != nil { + objectMap["machineId"] = md.MachineID + } + if md.MachineManagerID != nil { + objectMap["machineManagerId"] = md.MachineManagerID + } + if md.MachineName != nil { + objectMap["machineName"] = md.MachineName + } + if md.ExtendedInfo != nil { + objectMap["extendedInfo"] = md.ExtendedInfo + } + return json.Marshal(objectMap) +} + +// ODataPath ... +type ODataPath struct { + EdmType *IEdmType `json:"edmType,omitempty"` + NavigationSource *IEdmNavigationSource `json:"navigationSource,omitempty"` + Segments *[]ODataPathSegment `json:"segments,omitempty"` + PathTemplate *string `json:"pathTemplate,omitempty"` + Path *[]ODataPathSegment `json:"path,omitempty"` +} + +// ODataPathSegment ... +type ODataPathSegment struct { + EdmType *IEdmType `json:"edmType,omitempty"` + Identifier *string `json:"identifier,omitempty"` +} + +// ODataQueryContext ... +type ODataQueryContext struct { + DefaultQuerySettings *DefaultQuerySettings `json:"defaultQuerySettings,omitempty"` + Model *IEdmModel `json:"model,omitempty"` + ElementType *IEdmType `json:"elementType,omitempty"` + NavigationSource *IEdmNavigationSource `json:"navigationSource,omitempty"` + ElementClrType *string `json:"elementClrType,omitempty"` + Path *ODataPath `json:"path,omitempty"` + RequestContainer interface{} `json:"requestContainer,omitempty"` +} + +// ODataQueryOptions1 ... +type ODataQueryOptions1 struct { + IfMatch interface{} `json:"ifMatch,omitempty"` + IfNoneMatch interface{} `json:"ifNoneMatch,omitempty"` + Request interface{} `json:"request,omitempty"` + Context *ODataQueryContext `json:"context,omitempty"` + RawValues *ODataRawQueryOptions `json:"rawValues,omitempty"` + SelectExpand *SelectExpandQueryOption `json:"selectExpand,omitempty"` + Apply *ApplyQueryOption `json:"apply,omitempty"` + Filter *FilterQueryOption `json:"filter,omitempty"` + OrderBy *OrderByQueryOption `json:"orderBy,omitempty"` + Skip *SkipQueryOption `json:"skip,omitempty"` + Top *TopQueryOption `json:"top,omitempty"` + Count *CountQueryOption `json:"count,omitempty"` + Validator interface{} `json:"validator,omitempty"` +} + +// ODataRawQueryOptions ... +type ODataRawQueryOptions struct { + Filter *string `json:"filter,omitempty"` + Apply *string `json:"apply,omitempty"` + OrderBy *string `json:"orderBy,omitempty"` + Top *string `json:"top,omitempty"` + Skip *string `json:"skip,omitempty"` + Select *string `json:"select,omitempty"` + Expand *string `json:"expand,omitempty"` + Count *string `json:"count,omitempty"` + Format *string `json:"format,omitempty"` + SkipToken *string `json:"skipToken,omitempty"` + DeltaToken *string `json:"deltaToken,omitempty"` +} + +// Operation a REST API operation supported by the provider. +type Operation struct { + // Name - Name of the operation. + Name *string `json:"name,omitempty"` + // Display - Displayable properties of the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - Origin of the operation. + Origin *string `json:"origin,omitempty"` +} + +// OperationDisplay displayable properties of the operation. +type OperationDisplay struct { + // Provider - Provider of the operation. + Provider *string `json:"provider,omitempty"` + // Resource - Resource operated on by the operation. + Resource *string `json:"resource,omitempty"` + // Operation - Operation Type. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation. + Description *string `json:"description,omitempty"` +} + +// OperationResultList list of API operations. +type OperationResultList struct { + autorest.Response `json:"-"` + // Value - List of operations. + Value *[]Operation `json:"value,omitempty"` +} + +// OrderByClause ... +type OrderByClause struct { + ThenBy *OrderByClause `json:"thenBy,omitempty"` + Expression *SingleValueNode `json:"expression,omitempty"` + // Direction - Possible values include: 'Direction1Ascending', 'Direction1Descending' + Direction Direction1 `json:"direction,omitempty"` + RangeVariable *RangeVariable `json:"rangeVariable,omitempty"` + ItemType *IEdmTypeReference `json:"itemType,omitempty"` +} + +// OrderByNode ... +type OrderByNode struct { + // Direction - Possible values include: 'Ascending', 'Descending' + Direction Direction `json:"direction,omitempty"` +} + +// OrderByQueryOption ... +type OrderByQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + OrderByNodes *[]OrderByNode `json:"orderByNodes,omitempty"` + RawValue *string `json:"rawValue,omitempty"` + Validator interface{} `json:"validator,omitempty"` + OrderByClause *OrderByClause `json:"orderByClause,omitempty"` +} + +// Project migrate Project REST Resource. +type Project struct { + autorest.Response `json:"-"` + // ETag - Gets or sets the eTag for concurrency control. + ETag *string `json:"eTag,omitempty"` + // Location - Gets or sets the Azure location in which migrate project is created. + Location *string `json:"location,omitempty"` + // Properties - Gets or sets the nested properties. + Properties *ProjectProperties `json:"properties,omitempty"` + // ID - Gets the relative URL to get this migrate project. + ID *string `json:"id,omitempty"` + // Name - Gets or sets the name of the migrate project. + Name *string `json:"name,omitempty"` + // Type - Handled by resource provider. Type = Microsoft.Migrate/MigrateProject. + Type *string `json:"type,omitempty"` +} + +// ProjectProperties class for migrate project properties. +type ProjectProperties struct { + // RegisteredTools - Gets or sets the list of tools registered with the migrate project. + RegisteredTools *[]string `json:"registeredTools,omitempty"` + // Summary - Gets or sets the goals summary of the migrate Project. + // It maps the goal to its summary object. + Summary map[string]*GoalSummary `json:"summary"` +} + +// MarshalJSON is the custom marshaler for ProjectProperties. +func (pp ProjectProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pp.RegisteredTools != nil { + objectMap["registeredTools"] = pp.RegisteredTools + } + if pp.Summary != nil { + objectMap["summary"] = pp.Summary + } + return json.Marshal(objectMap) +} + +// RangeVariable ... +type RangeVariable struct { + Name *string `json:"name,omitempty"` + TypeReference *IEdmTypeReference `json:"typeReference,omitempty"` + Kind *int32 `json:"kind,omitempty"` +} + +// RefreshSummaryResult class representing the refresh summary status of the migrate project. +type RefreshSummaryResult struct { + autorest.Response `json:"-"` + // IsRefreshed - Gets or sets a value indicating whether the migrate project summary is refreshed. + IsRefreshed *bool `json:"isRefreshed,omitempty"` +} + +// RegisterToolInput class representing the register tool input. +type RegisterToolInput struct { + // Tool - Gets or sets the tool to be registered. + Tool *string `json:"tool,omitempty"` +} + +// RegistrationResult class representing the registration status of a tool with the migrate project. +type RegistrationResult struct { + autorest.Response `json:"-"` + // IsRegistered - Gets or sets a value indicating whether the tool is registered or not. + IsRegistered *bool `json:"isRegistered,omitempty"` +} + +// SelectExpandClause ... +type SelectExpandClause struct { + SelectedItems *[]interface{} `json:"selectedItems,omitempty"` + AllSelected *bool `json:"allSelected,omitempty"` +} + +// SelectExpandQueryOption ... +type SelectExpandQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + RawSelect *string `json:"rawSelect,omitempty"` + RawExpand *string `json:"rawExpand,omitempty"` + Validator interface{} `json:"validator,omitempty"` + SelectExpandClause *SelectExpandClause `json:"selectExpandClause,omitempty"` + LevelsMaxLiteralExpansionDepth *int32 `json:"levelsMaxLiteralExpansionDepth,omitempty"` +} + +// SingleValueNode ... +type SingleValueNode struct { + TypeReference *IEdmTypeReference `json:"typeReference,omitempty"` + // Kind - Possible values include: 'Kind1None', 'Kind1Constant', 'Kind1Convert', 'Kind1NonResourceRangeVariableReference', 'Kind1BinaryOperator', 'Kind1UnaryOperator', 'Kind1SingleValuePropertyAccess', 'Kind1CollectionPropertyAccess', 'Kind1SingleValueFunctionCall', 'Kind1Any', 'Kind1CollectionNavigationNode', 'Kind1SingleNavigationNode', 'Kind1SingleValueOpenPropertyAccess', 'Kind1SingleResourceCast', 'Kind1All', 'Kind1CollectionResourceCast', 'Kind1ResourceRangeVariableReference', 'Kind1SingleResourceFunctionCall', 'Kind1CollectionFunctionCall', 'Kind1CollectionResourceFunctionCall', 'Kind1NamedFunctionParameter', 'Kind1ParameterAlias', 'Kind1EntitySet', 'Kind1KeyLookup', 'Kind1SearchTerm', 'Kind1CollectionOpenPropertyAccess', 'Kind1CollectionComplexNode', 'Kind1SingleComplexNode', 'Kind1Count', 'Kind1SingleValueCast', 'Kind1CollectionPropertyNode', 'Kind1AggregatedCollectionPropertyNode', 'Kind1In', 'Kind1CollectionConstant' + Kind Kind1 `json:"kind,omitempty"` +} + +// SkipQueryOption ... +type SkipQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + RawValue *string `json:"rawValue,omitempty"` + Value *int32 `json:"value,omitempty"` + Validator interface{} `json:"validator,omitempty"` +} + +// Solution solution REST Resource. +type Solution struct { + autorest.Response `json:"-"` + // ID - Gets or sets the relative URL to get to this REST resource. + ID *string `json:"id,omitempty"` + // Name - Gets or sets the name of this REST resource. + Name *string `json:"name,omitempty"` + // Type - Gets the type of this REST resource. + Type *string `json:"type,omitempty"` + // Properties - Gets or sets the properties of the solution. + Properties *SolutionProperties `json:"properties,omitempty"` +} + +// SolutionConfig class representing the config for the solution in the migrate project. +type SolutionConfig struct { + autorest.Response `json:"-"` + // PublisherSasURI - Gets or sets the publisher sas uri for the solution. + PublisherSasURI *string `json:"publisherSasUri,omitempty"` +} + +// SolutionDetails class representing the details of the solution. +type SolutionDetails struct { + // GroupCount - Gets or sets the count of groups reported by the solution. + GroupCount *int32 `json:"groupCount,omitempty"` + // AssessmentCount - Gets or sets the count of assessments reported by the solution. + AssessmentCount *int32 `json:"assessmentCount,omitempty"` + // ExtendedDetails - Gets or sets the extended details reported by the solution. + ExtendedDetails map[string]*string `json:"extendedDetails"` +} + +// MarshalJSON is the custom marshaler for SolutionDetails. +func (sd SolutionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sd.GroupCount != nil { + objectMap["groupCount"] = sd.GroupCount + } + if sd.AssessmentCount != nil { + objectMap["assessmentCount"] = sd.AssessmentCount + } + if sd.ExtendedDetails != nil { + objectMap["extendedDetails"] = sd.ExtendedDetails + } + return json.Marshal(objectMap) +} + +// SolutionProperties class for solution properties. +type SolutionProperties struct { + // Tool - Gets or sets the tool being used in the solution. + Tool *string `json:"tool,omitempty"` + // Purpose - Gets or sets the purpose of the solution. + Purpose *string `json:"purpose,omitempty"` + // Goal - Gets or sets the goal of the solution. + Goal *string `json:"goal,omitempty"` + // IsInactive - Gets or sets a value indicating whether the solution is active or not. + IsInactive *bool `json:"isInactive,omitempty"` + // Summary - Gets or sets the summary of the solution. + Summary *SolutionSummary `json:"summary,omitempty"` + // Details - Gets or sets the details of the solution. + Details *SolutionDetails `json:"details,omitempty"` +} + +// SolutionsCollection collection of solutions. +type SolutionsCollection struct { + autorest.Response `json:"-"` + // Value - Gets or sets the list of solutions. + Value *[]Solution `json:"value,omitempty"` + // NextLink - Gets or sets the value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// SolutionSummary class representing the summary object for solution. +type SolutionSummary struct { + // DiscoveredCount - Gets or sets the count of entities discovered. + DiscoveredCount *int32 `json:"discoveredCount,omitempty"` + // AssessedCount - Gets or sets the count of entities assessed. + AssessedCount *int32 `json:"assessedCount,omitempty"` + // ReplicatingCount - Gets or sets the count of entities being replicated. + ReplicatingCount *int32 `json:"replicatingCount,omitempty"` + // MigratedCount - Gets or sets the count of entities migrated. + MigratedCount *int32 `json:"migratedCount,omitempty"` +} + +// TopQueryOption ... +type TopQueryOption struct { + Context *ODataQueryContext `json:"context,omitempty"` + RawValue *string `json:"rawValue,omitempty"` + Value *int32 `json:"value,omitempty"` + Validator interface{} `json:"validator,omitempty"` +} + +// TransformationNode ... +type TransformationNode struct { + // Kind - Possible values include: 'Aggregate', 'GroupBy', 'Filter', 'Compute' + Kind Kind `json:"kind,omitempty"` +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go new file mode 100644 index 000000000000..c30c160db986 --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go @@ -0,0 +1,92 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the migrate your workloads to Azure. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string, acceptLanguage string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} +} + +// List get a list of REST API supported by Microsoft.Migrate provider. +func (client OperationsClient) List(ctx context.Context) (result OperationResultList, err error) { + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Migrate/operations")) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go new file mode 100644 index 000000000000..2ced25ff7136 --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go @@ -0,0 +1,467 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ProjectsClient is the migrate your workloads to Azure. +type ProjectsClient struct { + BaseClient +} + +// NewProjectsClient creates an instance of the ProjectsClient client. +func NewProjectsClient(subscriptionID string, acceptLanguage string) ProjectsClient { + return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ProjectsClient { + return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} +} + +// DeleteMigrateProject delete the migrate project. Deleting non-existent project is a no-operation. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +func (client ProjectsClient) DeleteMigrateProject(ctx context.Context, resourceGroupName string, migrateProjectName string) (result autorest.Response, err error) { + req, err := client.DeleteMigrateProjectPreparer(ctx, resourceGroupName, migrateProjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "DeleteMigrateProject", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteMigrateProjectSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "DeleteMigrateProject", resp, "Failure sending request") + return + } + + result, err = client.DeleteMigrateProjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "DeleteMigrateProject", resp, "Failure responding to request") + } + + return +} + +// DeleteMigrateProjectPreparer prepares the DeleteMigrateProject request. +func (client ProjectsClient) DeleteMigrateProjectPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteMigrateProjectSender sends the DeleteMigrateProject request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) DeleteMigrateProjectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteMigrateProjectResponder handles the response to the DeleteMigrateProject request. The method always +// closes the http.Response Body. +func (client ProjectsClient) DeleteMigrateProjectResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetMigrateProject sends the get migrate project request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +func (client ProjectsClient) GetMigrateProject(ctx context.Context, resourceGroupName string, migrateProjectName string) (result Project, err error) { + req, err := client.GetMigrateProjectPreparer(ctx, resourceGroupName, migrateProjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "GetMigrateProject", nil, "Failure preparing request") + return + } + + resp, err := client.GetMigrateProjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "GetMigrateProject", resp, "Failure sending request") + return + } + + result, err = client.GetMigrateProjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "GetMigrateProject", resp, "Failure responding to request") + } + + return +} + +// GetMigrateProjectPreparer prepares the GetMigrateProject request. +func (client ProjectsClient) GetMigrateProjectPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMigrateProjectSender sends the GetMigrateProject request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) GetMigrateProjectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetMigrateProjectResponder handles the response to the GetMigrateProject request. The method always +// closes the http.Response Body. +func (client ProjectsClient) GetMigrateProjectResponder(resp *http.Response) (result Project, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// PatchMigrateProject update a migrate project with specified name. Supports partial updates, for example only tags +// can be provided. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// body - body with migrate project details. +func (client ProjectsClient) PatchMigrateProject(ctx context.Context, resourceGroupName string, migrateProjectName string, body Project) (result Project, err error) { + req, err := client.PatchMigrateProjectPreparer(ctx, resourceGroupName, migrateProjectName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PatchMigrateProject", nil, "Failure preparing request") + return + } + + resp, err := client.PatchMigrateProjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PatchMigrateProject", resp, "Failure sending request") + return + } + + result, err = client.PatchMigrateProjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PatchMigrateProject", resp, "Failure responding to request") + } + + return +} + +// PatchMigrateProjectPreparer prepares the PatchMigrateProject request. +func (client ProjectsClient) PatchMigrateProjectPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, body Project) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchMigrateProjectSender sends the PatchMigrateProject request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) PatchMigrateProjectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// PatchMigrateProjectResponder handles the response to the PatchMigrateProject request. The method always +// closes the http.Response Body. +func (client ProjectsClient) PatchMigrateProjectResponder(resp *http.Response) (result Project, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// PutMigrateProject sends the put migrate project request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// body - body with migrate project details. +func (client ProjectsClient) PutMigrateProject(ctx context.Context, resourceGroupName string, migrateProjectName string, body Project) (result Project, err error) { + req, err := client.PutMigrateProjectPreparer(ctx, resourceGroupName, migrateProjectName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PutMigrateProject", nil, "Failure preparing request") + return + } + + resp, err := client.PutMigrateProjectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PutMigrateProject", resp, "Failure sending request") + return + } + + result, err = client.PutMigrateProjectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "PutMigrateProject", resp, "Failure responding to request") + } + + return +} + +// PutMigrateProjectPreparer prepares the PutMigrateProject request. +func (client ProjectsClient) PutMigrateProjectPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, body Project) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutMigrateProjectSender sends the PutMigrateProject request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) PutMigrateProjectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// PutMigrateProjectResponder handles the response to the PutMigrateProject request. The method always +// closes the http.Response Body. +func (client ProjectsClient) PutMigrateProjectResponder(resp *http.Response) (result Project, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RefreshMigrateProjectSummary sends the refresh migrate project summary request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +func (client ProjectsClient) RefreshMigrateProjectSummary(ctx context.Context, resourceGroupName string, migrateProjectName string) (result RefreshSummaryResult, err error) { + req, err := client.RefreshMigrateProjectSummaryPreparer(ctx, resourceGroupName, migrateProjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RefreshMigrateProjectSummary", nil, "Failure preparing request") + return + } + + resp, err := client.RefreshMigrateProjectSummarySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RefreshMigrateProjectSummary", resp, "Failure sending request") + return + } + + result, err = client.RefreshMigrateProjectSummaryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RefreshMigrateProjectSummary", resp, "Failure responding to request") + } + + return +} + +// RefreshMigrateProjectSummaryPreparer prepares the RefreshMigrateProjectSummary request. +func (client ProjectsClient) RefreshMigrateProjectSummaryPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/refreshSummary", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshMigrateProjectSummarySender sends the RefreshMigrateProjectSummary request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) RefreshMigrateProjectSummarySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// RefreshMigrateProjectSummaryResponder handles the response to the RefreshMigrateProjectSummary request. The method always +// closes the http.Response Body. +func (client ProjectsClient) RefreshMigrateProjectSummaryResponder(resp *http.Response) (result RefreshSummaryResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegisterTool sends the register tool request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// input - input containing the name of the tool to be registered. +func (client ProjectsClient) RegisterTool(ctx context.Context, resourceGroupName string, migrateProjectName string, input RegisterToolInput) (result RegistrationResult, err error) { + req, err := client.RegisterToolPreparer(ctx, resourceGroupName, migrateProjectName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RegisterTool", nil, "Failure preparing request") + return + } + + resp, err := client.RegisterToolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RegisterTool", resp, "Failure sending request") + return + } + + result, err = client.RegisterToolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.ProjectsClient", "RegisterTool", resp, "Failure responding to request") + } + + return +} + +// RegisterToolPreparer prepares the RegisterTool request. +func (client ProjectsClient) RegisterToolPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, input RegisterToolInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/registerTool", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterToolSender sends the RegisterTool request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) RegisterToolSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// RegisterToolResponder handles the response to the RegisterTool request. The method always +// closes the http.Response Body. +func (client ProjectsClient) RegisterToolResponder(resp *http.Response) (result RegistrationResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go new file mode 100644 index 000000000000..94d17769d95f --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go @@ -0,0 +1,462 @@ +package migrate + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// SolutionsClient is the migrate your workloads to Azure. +type SolutionsClient struct { + BaseClient +} + +// NewSolutionsClient creates an instance of the SolutionsClient client. +func NewSolutionsClient(subscriptionID string, acceptLanguage string) SolutionsClient { + return NewSolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) +} + +// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client. +func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) SolutionsClient { + return SolutionsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} +} + +// DeleteSolution delete the solution. Deleting non-existent project is a no-operation. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// solutionName - unique name of a migration solution within a migrate project. +func (client SolutionsClient) DeleteSolution(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (result autorest.Response, err error) { + req, err := client.DeleteSolutionPreparer(ctx, resourceGroupName, migrateProjectName, solutionName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "DeleteSolution", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSolutionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "DeleteSolution", resp, "Failure sending request") + return + } + + result, err = client.DeleteSolutionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "DeleteSolution", resp, "Failure responding to request") + } + + return +} + +// DeleteSolutionPreparer prepares the DeleteSolution request. +func (client SolutionsClient) DeleteSolutionPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", solutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions/{solutionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if len(client.AcceptLanguage) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("Accept-Language", autorest.String(client.AcceptLanguage))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSolutionSender sends the DeleteSolution request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) DeleteSolutionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteSolutionResponder handles the response to the DeleteSolution request. The method always +// closes the http.Response Body. +func (client SolutionsClient) DeleteSolutionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnumerateSolutions sends the enumerate solutions request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +func (client SolutionsClient) EnumerateSolutions(ctx context.Context, resourceGroupName string, migrateProjectName string) (result SolutionsCollection, err error) { + req, err := client.EnumerateSolutionsPreparer(ctx, resourceGroupName, migrateProjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "EnumerateSolutions", nil, "Failure preparing request") + return + } + + resp, err := client.EnumerateSolutionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "EnumerateSolutions", resp, "Failure sending request") + return + } + + result, err = client.EnumerateSolutionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "EnumerateSolutions", resp, "Failure responding to request") + } + + return +} + +// EnumerateSolutionsPreparer prepares the EnumerateSolutions request. +func (client SolutionsClient) EnumerateSolutionsPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnumerateSolutionsSender sends the EnumerateSolutions request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) EnumerateSolutionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// EnumerateSolutionsResponder handles the response to the EnumerateSolutions request. The method always +// closes the http.Response Body. +func (client SolutionsClient) EnumerateSolutionsResponder(resp *http.Response) (result SolutionsCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetConfig sends the get config request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// solutionName - unique name of a migration solution within a migrate project. +func (client SolutionsClient) GetConfig(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (result SolutionConfig, err error) { + req, err := client.GetConfigPreparer(ctx, resourceGroupName, migrateProjectName, solutionName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetConfig", nil, "Failure preparing request") + return + } + + resp, err := client.GetConfigSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetConfig", resp, "Failure sending request") + return + } + + result, err = client.GetConfigResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetConfig", resp, "Failure responding to request") + } + + return +} + +// GetConfigPreparer prepares the GetConfig request. +func (client SolutionsClient) GetConfigPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", solutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions/{solutionName}/getConfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetConfigSender sends the GetConfig request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) GetConfigSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetConfigResponder handles the response to the GetConfig request. The method always +// closes the http.Response Body. +func (client SolutionsClient) GetConfigResponder(resp *http.Response) (result SolutionConfig, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSolution sends the get solution request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// solutionName - unique name of a migration solution within a migrate project. +func (client SolutionsClient) GetSolution(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (result Solution, err error) { + req, err := client.GetSolutionPreparer(ctx, resourceGroupName, migrateProjectName, solutionName) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetSolution", nil, "Failure preparing request") + return + } + + resp, err := client.GetSolutionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetSolution", resp, "Failure sending request") + return + } + + result, err = client.GetSolutionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "GetSolution", resp, "Failure responding to request") + } + + return +} + +// GetSolutionPreparer prepares the GetSolution request. +func (client SolutionsClient) GetSolutionPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", solutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions/{solutionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSolutionSender sends the GetSolution request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) GetSolutionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetSolutionResponder handles the response to the GetSolution request. The method always +// closes the http.Response Body. +func (client SolutionsClient) GetSolutionResponder(resp *http.Response) (result Solution, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// PatchSolution update a solution with specified name. Supports partial updates, for example only tags can be +// provided. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// solutionName - unique name of a migration solution within a migrate project. +// solutionInput - the input for the solution. +func (client SolutionsClient) PatchSolution(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string, solutionInput Solution) (result Solution, err error) { + req, err := client.PatchSolutionPreparer(ctx, resourceGroupName, migrateProjectName, solutionName, solutionInput) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PatchSolution", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSolutionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PatchSolution", resp, "Failure sending request") + return + } + + result, err = client.PatchSolutionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PatchSolution", resp, "Failure responding to request") + } + + return +} + +// PatchSolutionPreparer prepares the PatchSolution request. +func (client SolutionsClient) PatchSolutionPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string, solutionInput Solution) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", solutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions/{solutionName}", pathParameters), + autorest.WithJSON(solutionInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchSolutionSender sends the PatchSolution request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) PatchSolutionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// PatchSolutionResponder handles the response to the PatchSolution request. The method always +// closes the http.Response Body. +func (client SolutionsClient) PatchSolutionResponder(resp *http.Response) (result Solution, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// PutSolution sends the put solution request. +// Parameters: +// resourceGroupName - name of the Azure Resource Group that migrate project is part of. +// migrateProjectName - name of the Azure Migrate project. +// solutionName - unique name of a migration solution within a migrate project. +// solutionInput - the input for the solution. +func (client SolutionsClient) PutSolution(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string, solutionInput Solution) (result Solution, err error) { + req, err := client.PutSolutionPreparer(ctx, resourceGroupName, migrateProjectName, solutionName, solutionInput) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PutSolution", nil, "Failure preparing request") + return + } + + resp, err := client.PutSolutionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PutSolution", resp, "Failure sending request") + return + } + + result, err = client.PutSolutionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "migrate.SolutionsClient", "PutSolution", resp, "Failure responding to request") + } + + return +} + +// PutSolutionPreparer prepares the PutSolution request. +func (client SolutionsClient) PutSolutionPreparer(ctx context.Context, resourceGroupName string, migrateProjectName string, solutionName string, solutionInput Solution) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "migrateProjectName": autorest.Encode("path", migrateProjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", solutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/MigrateProjects/{migrateProjectName}/Solutions/{solutionName}", pathParameters), + autorest.WithJSON(solutionInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutSolutionSender sends the PutSolution request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) PutSolutionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// PutSolutionResponder handles the response to the PutSolution request. The method always +// closes the http.Response Body. +func (client SolutionsClient) PutSolutionResponder(resp *http.Response) (result Solution, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/version.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/version.go new file mode 100644 index 000000000000..45a00ba314a1 --- /dev/null +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/version.go @@ -0,0 +1,30 @@ +package migrate + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " migrate/2018-09-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +}