1+ // <copyright company="Datadog">
2+ // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
3+ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
4+ // </copyright>
5+ // <auto-generated/>
6+
7+ #nullable enable
8+
9+ namespace Datadog . Trace . Telemetry . Metrics ;
10+
11+ /// <summary>
12+ /// Extension methods for <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" />
13+ /// </summary>
14+ internal static partial class IastSourceTypeExtensions
15+ {
16+ /// <summary>
17+ /// The number of members in the enum.
18+ /// This is a non-distinct count of defined names.
19+ /// </summary>
20+ public const int Length = 14 ;
21+
22+ /// <summary>
23+ /// Returns the string representation of the <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType"/> value.
24+ /// If the attribute is decorated with a <c>[Description]</c> attribute, then
25+ /// uses the provided value. Otherwise uses the name of the member, equivalent to
26+ /// calling <c>ToString()</c> on <paramref name="value"/>.
27+ /// </summary>
28+ /// <param name="value">The value to retrieve the string value for</param>
29+ /// <returns>The string representation of the value</returns>
30+ public static string ToStringFast ( this Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType value )
31+ => value switch
32+ {
33+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestBody => "source_type:http.request.body" ,
34+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestPath => "source_type:http.request.path" ,
35+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterName => "source_type:http.request.parameter.name" ,
36+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterValue => "source_type:http.request.parameter" ,
37+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RoutedParameterValue => "source_type:http.request.path.parameter" ,
38+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderValue => "source_type:http.request.header" ,
39+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderName => "source_type:http.request.header.name" ,
40+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestQuery => "source_type:http.request.query" ,
41+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieName => "source_type:http.request.cookie.name" ,
42+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieValue => "source_type:http.request.cookie.value" ,
43+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . MatrixParameter => "source_type:http.request.matrix.parameter" ,
44+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestUri => "source_type:http.request.uri" ,
45+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . GrpcRequestBody => "source_type:grpc.request.body" ,
46+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . SqlRowValue => "source_type:sql.row.value" ,
47+ _ => value . ToString ( ) ,
48+ } ;
49+
50+ /// <summary>
51+ /// Retrieves an array of the values of the members defined in
52+ /// <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" />.
53+ /// Note that this returns a new array with every invocation, so
54+ /// should be cached if appropriate.
55+ /// </summary>
56+ /// <returns>An array of the values defined in <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" /></returns>
57+ public static Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType [ ] GetValues ( )
58+ => new [ ]
59+ {
60+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestBody ,
61+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestPath ,
62+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterName ,
63+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterValue ,
64+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RoutedParameterValue ,
65+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderValue ,
66+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderName ,
67+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestQuery ,
68+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieName ,
69+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieValue ,
70+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . MatrixParameter ,
71+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestUri ,
72+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . GrpcRequestBody ,
73+ Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . SqlRowValue ,
74+ } ;
75+
76+ /// <summary>
77+ /// Retrieves an array of the names of the members defined in
78+ /// <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" />.
79+ /// Note that this returns a new array with every invocation, so
80+ /// should be cached if appropriate.
81+ /// Ignores <c>[Description]</c> definitions.
82+ /// </summary>
83+ /// <returns>An array of the names of the members defined in <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" /></returns>
84+ public static string [ ] GetNames ( )
85+ => new [ ]
86+ {
87+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestBody ) ,
88+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestPath ) ,
89+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterName ) ,
90+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestParameterValue ) ,
91+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RoutedParameterValue ) ,
92+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderValue ) ,
93+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestHeaderName ) ,
94+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestQuery ) ,
95+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieName ) ,
96+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . CookieValue ) ,
97+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . MatrixParameter ) ,
98+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . RequestUri ) ,
99+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . GrpcRequestBody ) ,
100+ nameof ( Datadog . Trace . Telemetry . Metrics . MetricTags . IastSourceType . SqlRowValue ) ,
101+ } ;
102+
103+ /// <summary>
104+ /// Retrieves an array of the names of the members defined in
105+ /// <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" />.
106+ /// Note that this returns a new array with every invocation, so
107+ /// should be cached if appropriate.
108+ /// Uses <c>[Description]</c> definition if available, otherwise uses the name of the property
109+ /// </summary>
110+ /// <returns>An array of the names of the members defined in <see cref="Datadog.Trace.Telemetry.Metrics.MetricTags.IastSourceType" /></returns>
111+ public static string [ ] GetDescriptions ( )
112+ => new [ ]
113+ {
114+ "source_type:http.request.body" ,
115+ "source_type:http.request.path" ,
116+ "source_type:http.request.parameter.name" ,
117+ "source_type:http.request.parameter" ,
118+ "source_type:http.request.path.parameter" ,
119+ "source_type:http.request.header" ,
120+ "source_type:http.request.header.name" ,
121+ "source_type:http.request.query" ,
122+ "source_type:http.request.cookie.name" ,
123+ "source_type:http.request.cookie.value" ,
124+ "source_type:http.request.matrix.parameter" ,
125+ "source_type:http.request.uri" ,
126+ "source_type:grpc.request.body" ,
127+ "source_type:sql.row.value" ,
128+ } ;
129+ }
0 commit comments