/// <summary> /// Init the <see cref="HttpRequest"/>. /// </summary> /// <param name="record">The input record.</param> public virtual void Init(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Description. Description = record.GetString("Description"); // MethodDescription. MethodDescription = record.GetString("MethodDescription"); // MethodType. MethodType = record.GetString("MethodType"); // CustomQueryOptions CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions", (s, r) => s.Init(r as IEdmRecordExpression)); // CustomHeaders CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders", (s, r) => s.Init(r as IEdmRecordExpression)); // HttpResponses HttpResponses = record.GetCollection <HttpResponse>("HttpResponses", (s, r) => s.Init(r as IEdmRecordExpression)); // SecuritySchemes SecuritySchemes = record.GetCollection <SecurityScheme>("SecuritySchemes", (s, r) => s.Init(r as IEdmRecordExpression)); }
/// <summary> /// Init the <see cref="DeleteRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Deletable Deletable = record.GetBoolean("Deletable"); // NonDeletableNavigationProperties NonDeletableNavigationProperties = record.GetCollectionPropertyPath("NonDeletableNavigationProperties"); // MaxLevels MaxLevels = (int?)record.GetInteger("MaxLevels"); // FilterSegmentSupported FilterSegmentSupported = record.GetBoolean("FilterSegmentSupported"); // TypecastSegmentSupported TypecastSegmentSupported = record.GetBoolean("TypecastSegmentSupported"); // Permissions Permissions = record.GetCollection <PermissionType>("Permissions"); // CustomHeaders CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders"); // CustomQueryOptions CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions"); // Description Description = record.GetString("Description"); // LongDescription LongDescription = record.GetString("LongDescription"); }
/// <summary> /// Init the <see cref="SearchRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // FilterSegmentSupported FilterSegmentSupported = record.GetBoolean("FilterSegmentSupported"); // Permissions Permissions = record.GetCollection <PermissionType>("Permissions"); // CustomHeaders CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders"); // CustomQueryOptions CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions"); }
/// <summary> /// Init the <see cref="CustomParameter"/> /// </summary> /// <param name="record">The input record.</param> public virtual void Init(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Name Name = record.GetString("Name"); // Description Description = record.GetString("Description"); // DocumentationURL DocumentationURL = record.GetString("DocumentationURL"); // Required Required = record.GetBoolean("Required"); // ExampleValues ExampleValues = record.GetCollection("ExampleValues", r => { IEdmRecordExpression itemRecord = r as IEdmRecordExpression; if (itemRecord != null) { return(Example.CreateExample(itemRecord)); } return(null); }); }
/// <summary> /// Init the <see cref="UpdateRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Updatable Updatable = record.GetBoolean("Updatable"); // Upsertable Upsertable = record.GetBoolean("Upsertable"); // DeltaUpdateSupported DeltaUpdateSupported = record.GetBoolean("DeltaUpdateSupported"); // UpdateMethod UpdateMethod = record.GetEnum <HttpMethod>("UpdateMethod"); // FilterSegmentSupported FilterSegmentSupported = record.GetBoolean("FilterSegmentSupported"); // TypecastSegmentSupported TypecastSegmentSupported = record.GetBoolean("TypecastSegmentSupported"); // NonUpdatableNavigationProperties NonUpdatableNavigationProperties = record.GetCollectionPropertyPath("NonUpdatableNavigationProperties"); // MaxLevels MaxLevels = record.GetInteger("MaxLevels"); // Permissions Permissions = record.GetCollection <PermissionType>("Permissions"); // QueryOptions QueryOptions = record.GetRecord <ModificationQueryOptionsType>("QueryOptions"); // CustomHeaders CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders"); // CustomQueryOptions CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions"); // Description Description = record.GetString("Description"); // LongDescription LongDescription = record.GetString("LongDescription"); }
/// <summary> /// Init the <see cref="SecurityScheme"/>. /// </summary> /// <param name="record">The input record.</param> public void Init(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // AuthorizationSchemeName Authorization = record.GetString("Authorization"); // RequiredScopes RequiredScopes = record.GetCollection("RequiredScopes"); }
/// <summary> /// Init the <see cref="NavigationRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Navigability Navigability = record.GetEnum <NavigationType>("Navigability"); // RestrictedProperties RestrictedProperties = record.GetCollection <NavigationPropertyRestriction>("RestrictedProperties"); }
/// <summary> /// Init the <see cref="PermissionType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // SchemeName SchemeName = record.GetString("SchemeName"); // Scopes Scopes = record.GetCollection <ScopeType>("Scopes"); }
/// <summary> /// Init the <see cref="NavigationPropertyRestriction"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // NavigationProperty NavigationProperty = record.GetPropertyPath("NavigationProperty"); // maybe call "GetNavigationPropertyPath // Navigability Navigability = record.GetEnum <NavigationType>("Navigability"); // FilterFunctions FilterFunctions = record.GetCollection("FilterFunctions"); // FilterRestrictions FilterRestrictions = record.GetRecord <FilterRestrictionsType>("FilterRestrictions"); // SearchRestrictions SearchRestrictions = record.GetRecord <SearchRestrictionsType>("SearchRestrictions"); // SortRestrictions SortRestrictions = record.GetRecord <SortRestrictionsType>("SortRestrictions"); // TopSupported TopSupported = record.GetBoolean("TopSupported"); // SkipSupported SkipSupported = record.GetBoolean("SkipSupported"); // SelectSupport SelectSupport = record.GetRecord <SelectSupportType>("SelectSupport"); // IndexableByKey IndexableByKey = record.GetBoolean("IndexableByKey"); // InsertRestrictions InsertRestrictions = record.GetRecord <InsertRestrictionsType>("InsertRestrictions"); // DeepInsertSupport DeepInsertSupport = record.GetRecord <DeepInsertSupportType>("DeepInsertSupport"); // UpdateRestrictions UpdateRestrictions = record.GetRecord <UpdateRestrictionsType>("UpdateRestrictions"); // DeepUpdateSupport DeepUpdateSupport = record.GetRecord <DeepUpdateSupportType>("DeepUpdateSupport"); // DeleteRestrictions DeleteRestrictions = record.GetRecord <DeleteRestrictionsType>("DeleteRestrictions"); // IndexableByKey OptimisticConcurrencyControl = record.GetBoolean("OptimisticConcurrencyControl"); // ReadRestrictions ReadRestrictions = record.GetRecord <ReadRestrictionsType>("ReadRestrictions"); }
/// <summary> /// Init <see cref="OAuthAuthorization"/>. /// </summary> /// <param name="record">the input record.</param> public override void Initialize(IEdmRecordExpression record) { // base checked. base.Initialize(record); // Scopes Scopes = record.GetCollection <AuthorizationScope>("Scopes"); // RefreshUrl RefreshUrl = record.GetString("RefreshUrl"); }
/// <summary> /// Init <see cref="OAuthAuthorization"/>. /// </summary> /// <param name="record">the input record.</param> public override void Init(IEdmRecordExpression record) { // base checked. base.Init(record); // Scopes Scopes = record.GetCollection <AuthorizationScope>("Scopes", (s, item) => s.Init(item as IEdmRecordExpression)); // RefreshUrl RefreshUrl = record.GetString("RefreshUrl"); }
/// <summary> /// Init the <see cref="ReadRestrictionsBase"/>. /// </summary> /// <param name="record">The input record.</param> public virtual void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Readable Readable = record.GetBoolean("Readable"); // Permissions Permissions = record.GetCollection <PermissionType>("Permissions"); // CustomHeaders CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders"); // CustomQueryOptions CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions"); // Description Description = record.GetString("Description"); // LongDescription LongDescription = record.GetString("LongDescription"); }
/// <summary> /// Init the <see cref="CustomParameter"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Name Name = record.GetString("Name"); // Description Description = record.GetString("Description"); // DocumentationURL DocumentationURL = record.GetString("DocumentationURL"); // Required Required = record.GetBoolean("Required"); // ExampleValues ExampleValues = record.GetCollection <PrimitiveExampleValue>("ExampleValues"); }
/// <summary> /// Int the <see cref="HttpResponse"/>. /// </summary> /// <param name="record">The input record.</param> public void Init(IEdmRecordExpression record) { // ResponseCode ResponseCode = record.GetString("ResponseCode"); // Description Description = record.GetString("Description"); // Examples Examples = record.GetCollection("Examples", r => { IEdmRecordExpression itemRecord = r as IEdmRecordExpression; if (itemRecord != null) { return(Example.CreateExample(itemRecord)); } return(null); }); }
/// <summary> /// Init the <see cref="FilterRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // Filterable Filterable = record.GetBoolean("Filterable"); // RequiresFilter RequiresFilter = record.GetBoolean("RequiresFilter"); // RequiredProperties RequiredProperties = record.GetCollectionPropertyPath("RequiredProperties"); // NonFilterableProperties NonFilterableProperties = record.GetCollectionPropertyPath("NonFilterableProperties"); // MaxLevels MaxLevels = record.GetInteger("MaxLevels"); // FilterExpressionRestrictions FilterExpressionRestrictions = record.GetCollection <FilterExpressionRestrictionType>("FilterExpressionRestrictions"); }
/// <summary> /// Init the <see cref="CollectionPropertyRestrictionsType"/>. /// </summary> /// <param name="record">The input record.</param> public virtual void Initialize(IEdmRecordExpression record) { Utils.CheckArgumentNull(record, nameof(record)); // CollectionProperty CollectionProperty = record.GetPropertyPath("CollectionProperty"); // FilterFunctions FilterFunctions = record.GetCollection("FilterFunctions"); // FilterRestrictions FilterRestrictions = record.GetRecord <FilterRestrictionsType>("FilterRestrictions"); // SearchRestrictions SearchRestrictions = record.GetRecord <SearchRestrictionsType>("SearchRestrictions"); // SortRestrictions SortRestrictions = record.GetRecord <SortRestrictionsType>("SortRestrictions"); // TopSupported TopSupported = record.GetBoolean("TopSupported"); // SkipSupported SkipSupported = record.GetBoolean("SkipSupported"); // SelectSupport SelectSupport = record.GetRecord <SelectSupportType>("SelectSupport"); // Insertable Insertable = record.GetBoolean("Insertable"); // Updatable Updatable = record.GetBoolean("Updatable"); // Deletable Deletable = record.GetBoolean("Deletable"); }