public async Task <GoCDPipelineConfig> EditAsync(GoCDPipelineConfig pipelineConfig) { return(await this.BeginRequest() .WithHeader("If-Match", pipelineConfig.ETag) .AppendPathSegment(pipelineConfig.Name) .PutJsonAsync(pipelineConfig) .ReceiveJson <GoCDPipelineConfig>() .ConfigureAwait(false)); }
public GoCDCreatePipelineConfigRequest(GoCDPipelineConfig pipelineConfig) { this.Group = pipelineConfig.Group; this.Pipeline = new GoCDPipeline { EnvironmentVariables = pipelineConfig.EnvironmentVariables, LabelTemplate = pipelineConfig.LabelTemplate, LockBehavior = pipelineConfig.LockBehavior, Materials = pipelineConfig.Materials, Name = pipelineConfig.Name, Parameters = pipelineConfig.Parameters, Stages = pipelineConfig.Stages, Template = pipelineConfig.Template, Timer = pipelineConfig.Timer }; }
public async Task <GoCDPipelineConfig> CreateAsync(GoCDPipelineConfig pipelineConfig) { return(await this.CreateAsync(new GoCDCreatePipelineConfigRequest(pipelineConfig))); }