public sealed class CreateSpecRequest : IMessage<CreateSpecRequest>, IEquatable<CreateSpecRequest>, IDeepCloneable<CreateSpecRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the API hub v1 API class CreateSpecRequest.
The [CreateSpec][google.cloud.apihub.v1.ApiHub.CreateSpec] method's request.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eCreateSpecRequest\u003c/code\u003e class, which is used to create a new spec within the API hub v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateSpecRequest\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, showcasing its compatibility with the .NET Protobuf framework.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties to specify the parent resource (\u003ccode\u003eParent\u003c/code\u003e or \u003ccode\u003eParentAsVersionName\u003c/code\u003e), the \u003ccode\u003eSpec\u003c/code\u003e to be created, and an optional \u003ccode\u003eSpecId\u003c/code\u003e for custom naming, offering both flexibility and control.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateSpecRequest\u003c/code\u003e has two constructor options, allowing for the creation of a new instance or cloning from an existing one, ensuring the appropriate instantiation based on the scenario.\u003c/p\u003e\n"],["\u003cp\u003eThe provided information is specific to the \u003ccode\u003eGoogle.Cloud.ApiHub.V1\u003c/code\u003e namespace and it's associated assembly \u003ccode\u003eGoogle.Cloud.ApiHub.V1.dll\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# API hub v1 API - Class CreateSpecRequest (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.CreateSpecRequest)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/1.0.0-beta02/Google.Cloud.ApiHub.V1.CreateSpecRequest) \n\n public sealed class CreateSpecRequest : IMessage\u003cCreateSpecRequest\u003e, IEquatable\u003cCreateSpecRequest\u003e, IDeepCloneable\u003cCreateSpecRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the API hub v1 API class CreateSpecRequest.\n\nThe \\[CreateSpec\\]\\[google.cloud.apihub.v1.ApiHub.CreateSpec\\] method's request. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateSpecRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateSpecRequest](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.CreateSpecRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateSpecRequest](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.CreateSpecRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateSpecRequest](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.CreateSpecRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.ApiHub.V1](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.ApiHub.V1.dll\n\nConstructors\n------------\n\n### CreateSpecRequest()\n\n public CreateSpecRequest()\n\n### CreateSpecRequest(CreateSpecRequest)\n\n public CreateSpecRequest(CreateSpecRequest other)\n\nProperties\n----------\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The parent resource for Spec.\nFormat:\n`projects/{project}/locations/{location}/apis/{api}/versions/{version}`\n\n### ParentAsVersionName\n\n public VersionName ParentAsVersionName { get; set; }\n\n[VersionName](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.VersionName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.CreateSpecRequest#Google_Cloud_ApiHub_V1_CreateSpecRequest_Parent) resource name property.\n\n### Spec\n\n public Spec Spec { get; set; }\n\nRequired. The spec to create.\n\n### SpecId\n\n public string SpecId { get; set; }\n\nOptional. The ID to use for the spec, which will become the final component\nof the spec's resource name. This field is optional.\n\n- If provided, the same will be used. The service will throw an error if the specified id is already used by another spec in the API resource.\n- If not provided, a system generated id will be used.\n\nThis value should be 4-500 characters, and valid characters\nare /\\[a-z\\]\\[A-Z\\]\\[0-9\\]-_/."]]