internal static TypeAttributes GetTypeAttributes(TableModifiers modifiers, bool isAbstract, EntityGenerationContext context) { // what? switch (modifiers) { case TableModifiers.Internal: if (isAbstract) { return(TypeAttributes.NestedAssembly | TypeAttributes.Abstract); } else { return(TypeAttributes.NestedAssembly); } case TableModifiers.Public: if (isAbstract) { return(TypeAttributes.Public | TypeAttributes.Abstract); } else { return(TypeAttributes.Public); } default: throw new NotSupportedException(string.Format("Cannot handle '{0}'.", modifiers)); } }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (expireTime_ != null) { hash ^= ExpireTime.GetHashCode(); } if (DataFormat != 0) { hash ^= DataFormat.GetHashCode(); } if (schemaCase_ == SchemaOneofCase.AvroSchema) { hash ^= AvroSchema.GetHashCode(); } if (schemaCase_ == SchemaOneofCase.ArrowSchema) { hash ^= ArrowSchema.GetHashCode(); } if (Table.Length != 0) { hash ^= Table.GetHashCode(); } if (tableModifiers_ != null) { hash ^= TableModifiers.GetHashCode(); } if (readOptions_ != null) { hash ^= ReadOptions.GetHashCode(); } hash ^= streams_.GetHashCode(); hash ^= (int)schemaCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(ReadSession other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.expireTime_ != null) { if (expireTime_ == null) { ExpireTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } ExpireTime.MergeFrom(other.ExpireTime); } if (other.DataFormat != 0) { DataFormat = other.DataFormat; } if (other.Table.Length != 0) { Table = other.Table; } if (other.tableModifiers_ != null) { if (tableModifiers_ == null) { TableModifiers = new global::Google.Cloud.BigQuery.Storage.V1.ReadSession.Types.TableModifiers(); } TableModifiers.MergeFrom(other.TableModifiers); } if (other.readOptions_ != null) { if (readOptions_ == null) { ReadOptions = new global::Google.Cloud.BigQuery.Storage.V1.ReadSession.Types.TableReadOptions(); } ReadOptions.MergeFrom(other.ReadOptions); } streams_.Add(other.streams_); switch (other.SchemaCase) { case SchemaOneofCase.AvroSchema: if (AvroSchema == null) { AvroSchema = new global::Google.Cloud.BigQuery.Storage.V1.AvroSchema(); } AvroSchema.MergeFrom(other.AvroSchema); break; case SchemaOneofCase.ArrowSchema: if (ArrowSchema == null) { ArrowSchema = new global::Google.Cloud.BigQuery.Storage.V1.ArrowSchema(); } ArrowSchema.MergeFrom(other.ArrowSchema); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }