public Operation Build(Operation provided = null)
{
if (this.responses == null)
{
throw new RequiredFieldException("Responses");
}
if (this.responses.Count < 1)
{
throw new InvalidOperationException(
"The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.");
}
provided = provided ?? new Operation();
provided.Tags = this.tags;
provided.Summary = this.summary;
provided.Description = this.description;
provided.ExternalDocumentation = this.documentation;
provided.OperationId = this.operationId;
provided.Consumes = this.consumes;
provided.Produces = this.produces;
provided.Parameters = this.parameters;
provided.Responses = this.responses;
provided.Schemes = this.schemes;
provided.Deprecated = this.deprecated;
provided.SecurityRequirements = this.securityRequirements;
return provided;
}