protected override void RunCmdlet()
        {
            this.ConfirmAction(
                this.Force.IsPresent,
                Resources.NewServiceWarning.FormatInvariant(this.Name),
                "Creating the new web service",
                this.Name,
                () => {
                if (string.Equals(
                        this.ParameterSetName,
                        NewAzureMLWebService.CreateFromFileParameterSet,
                        StringComparison.OrdinalIgnoreCase))
                {
                    string jsonDefinition =
                        CmdletHelpers.GetWebServiceDefinitionFromFile(
                            this.SessionState.Path.CurrentFileSystemLocation.Path,
                            this.DefinitionFile);
                    this.NewWebServiceDefinition =
                        ModelsSerializationUtil.GetAzureMLWebServiceFromJsonDefinition(jsonDefinition);
                }

                WebService newWebService =
                    this.WebServicesClient.CreateAzureMlWebService(
                        this.ResourceGroupName,
                        this.Location,
                        this.Name,
                        this.NewWebServiceDefinition);
                this.WriteObject(newWebService);
            });
        }
        protected override void RunCmdlet()
        {
            string jsonDefinition = this.JsonString;

            if (string.Equals(
                    this.ParameterSetName,
                    ImportWebServiceDefinition.ImportFromFileParamSet,
                    StringComparison.OrdinalIgnoreCase))
            {
                jsonDefinition = CmdletHelpers.GetWebServiceDefinitionFromFile(
                    this.SessionState.Path.CurrentFileSystemLocation.Path,
                    this.InputFile);
            }

            WebService serviceDefinition = ModelsSerializationUtil.GetAzureMLWebServiceFromJsonDefinition(jsonDefinition);

            this.WriteObject(serviceDefinition);
        }