/// <summary>
        /// Creates a nested field with the specified schema, and adds it to the schema being built.
        /// This method simply delegates to <see cref="Add(string, TableSchema, FieldMode, string)"/> after calling <see cref="Build"/>
        /// on <paramref name="nestedSchema"/>.
        /// </summary>
        /// <param name="name">The name of the field. Must be a valid field name.</param>
        /// <param name="nestedSchema">The schema for the nested field, in the form of a <see cref="TableSchemaBuilder"/>. Must not be null.</param>
        /// <param name="mode">The mode of the field. Must be a defined member within <see cref="FieldMode"/>.</param>
        /// <param name="description">The description of the field. May be null.</param>
        public void Add(string name, TableSchemaBuilder nestedSchema, FieldMode mode = FieldMode.Nullable, string description = null)
        {
            var builtSchema = GaxRestPreconditions.CheckNotNull(nestedSchema, nameof(nestedSchema)).Build();

            Add(name, builtSchema, mode, description);
        }
Example #2
0
 /// <summary>
 /// Adds a single field value to the row.
 /// </summary>
 /// <param name="key">The name of the field. Must be a valid BigQuery field name.</param>
 /// <param name="value">The value for the field, which must be <c>null</c> or one of the supported types.</param>
 public void Add(string key, object value)
 {
     TableSchemaBuilder.ValidateFieldName(key, nameof(key));
     ValidateValue(value, nameof(value));
     _fields.Add(key, value);
 }