/// <summary>
 /// Tries to parse a resource name in string form into a new <see cref="SecurityMarksNameOneOf"/> instance.
 /// </summary>
 /// <remarks>
 /// To parse successfully the resource name must be one of the following:
 /// <list type="bullet">
 /// <item><description>OrganizationAssetName: A resource of type 'organization'.</description></item>
 /// <item><description>OrganizationSourceFindingName: A resource of type 'source'.</description></item>
 /// </list>
 /// Or an <see cref="gax::UnknownResourceName"/> if <paramref name="allowUnknown"/> is <c>true</c>
 /// </remarks>
 /// <param name="name">The resource name in string form. Must not be <c>null</c>.</param>
 /// <param name="allowUnknown">
 /// If <c>true</c>, will successfully parse an unknown resource name into an
 /// <see cref="gax::UnknownResourceName"/>.
 /// </param>
 /// <param name="result">
 /// When this method returns, the parsed <see cref="SecurityMarksNameOneOf"/>, or <c>null</c> if parsing fails.
 /// </param>
 /// <returns><c>true</c> if the name was parsed succssfully; othrewise <c>false</c></returns>
 public static bool TryParse(string name, bool allowUnknown, out SecurityMarksNameOneOf result)
 {
     gax::GaxPreconditions.CheckNotNull(name, nameof(name));
     if (OrganizationAssetName.TryParse(name, out OrganizationAssetName organizationAssetName))
     {
         result = new SecurityMarksNameOneOf(OneofType.OrganizationAssetName, organizationAssetName);
         return(true);
     }
     if (OrganizationSourceFindingName.TryParse(name, out OrganizationSourceFindingName organizationSourceFindingName))
     {
         result = new SecurityMarksNameOneOf(OneofType.OrganizationSourceFindingName, organizationSourceFindingName);
         return(true);
     }
     if (allowUnknown)
     {
         if (gax::UnknownResourceName.TryParse(name, out gax::UnknownResourceName unknownResourceName))
         {
             result = new SecurityMarksNameOneOf(OneofType.Unknown, unknownResourceName);
             return(true);
         }
     }
     result = null;
     return(false);
 }
 /// <summary>
 /// Constructs a new instance of <see cref="SecurityMarksNameOneOf"/> from the provided
 /// <see cref="OrganizationSourceFindingName"/>.
 /// </summary>
 /// <param name="organizationSourceFindingName">
 /// The <see cref="OrganizationSourceFindingName"/> to be contained within the returned
 /// <see cref="SecurityMarksNameOneOf"/>. Must not be <c>null</c>
 /// </param>
 /// <returns>
 /// A new <see cref="SecurityMarksNameOneOf"/>, containing <paramref name="organizationSourceFindingName"/>.
 /// </returns>
 public static SecurityMarksNameOneOf From(OrganizationSourceFindingName organizationSourceFindingName) =>
 new SecurityMarksNameOneOf(OneofType.OrganizationSourceFindingName, organizationSourceFindingName);