Inheritance: Microsoft.Azure.Commands.StreamAnalytics.Models.JobParametersBase
        public virtual PSFunction RetrieveDefaultPSFunctionDefinition(RetrieveDefaultPSFunctionDefinitionParameter parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter");
            }

            FunctionRetrieveDefaultDefinitionParameters functionRetrieveDefaultDefinitionParameters = SafeJsonConvert.DeserializeObject <FunctionRetrieveDefaultDefinitionParameters>(
                parameter.RawJsonContent,
                StreamAnalyticsClientExtensions.DeserializationSettings);

            var response = StreamAnalyticsManagementClient.Functions.RetrieveDefaultDefinition(
                parameter.ResourceGroupName, parameter.JobName, parameter.FunctionName, functionRetrieveDefaultDefinitionParameters);

            return(new PSFunction(response)
            {
                ResourceGroupName = parameter.ResourceGroupName,
                JobName = parameter.JobName
            });
        }
        public virtual PSFunction RetrieveDefaultPSFunctionDefinition(RetrieveDefaultPSFunctionDefinitionParameter parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter");
            }

            var response = StreamAnalyticsManagementClient.Functions.RetrieveDefaultDefinitionWithRawJsonContent(
                parameter.ResourceGroupName, parameter.JobName, parameter.FunctionName,
                new FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters()
            {
                Content = parameter.RawJsonContent
            });

            return(new PSFunction(response.Function)
            {
                ResourceGroupName = parameter.ResourceGroupName,
                JobName = parameter.JobName
            });
        }
        public override void ExecuteCmdlet()
        {
            if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
            {
                throw new PSArgumentNullException("ResourceGroupName");
            }

            if (JobName != null && string.IsNullOrWhiteSpace(JobName))
            {
                throw new PSArgumentNullException("JobName");
            }

            if (File != null && string.IsNullOrWhiteSpace(File))
            {
                throw new PSArgumentNullException("File");
            }

            string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

            Name = ResolveResourceName(rawJsonContent, Name, "Function");

            if (Name != null && string.IsNullOrWhiteSpace(Name))
            {
                throw new ArgumentException(Resources.FunctionNameCannotBeEmpty);
            }

            RetrieveDefaultPSFunctionDefinitionParameter parameter = new RetrieveDefaultPSFunctionDefinitionParameter
            {
                ResourceGroupName = ResourceGroupName,
                JobName = JobName,
                FunctionName = Name,
                RawJsonContent = rawJsonContent
            };

            WriteObject(StreamAnalyticsClient.RetrieveDefaultPSFunctionDefinition(parameter));
        }
        public virtual PSFunction RetrieveDefaultPSFunctionDefinition(RetrieveDefaultPSFunctionDefinitionParameter parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter");
            }

            var response = StreamAnalyticsManagementClient.Functions.RetrieveDefaultDefinitionWithRawJsonContent(
                parameter.ResourceGroupName, parameter.JobName, parameter.FunctionName,
                new FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters() {Content = parameter.RawJsonContent});

            return new PSFunction(response.Function)
            {
                ResourceGroupName = parameter.ResourceGroupName,
                JobName = parameter.JobName
            };
        }