content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
list
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Snarf.Udp; namespace Snarf.Nfs { public static class NfsListenerManager { private static List<Tuple<int, int, UdpListener>> _cache; static NfsListenerManager() { _cache = new List<Tuple<int, int, UdpListener>>(); } public static UdpListener GetListener(int port, int programId) { var tuple = _cache.Where(o => o.Item1 == port).FirstOrDefault(); UdpListener listener = null; if (tuple == null) { listener = new UdpListener(port, false); listener.Start(); _cache.Add(new Tuple<int,int,UdpListener>(port, programId, listener)); } else { listener = tuple.Item3; } return listener; } } }
20.756757
74
0.690104
[ "MIT" ]
shellscape/Snarf
Application/Nfs/NfsListenerManager.cs
770
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Luna Multiplayer Mod")] [assembly: AssemblyDescription("Luna Multiplayer Mod (server)")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LMP")] [assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("Gabriel Vazquez")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("fa6e9184-e243-49cc-94fa-ac557493b900")] [assembly: AssemblyVersion("0.28.0")] [assembly: AssemblyFileVersion("0.28.0")] [assembly: AssemblyInformationalVersion("0.28.0-compiled")] [assembly: InternalsVisibleTo("ServerTest")]
33.181818
64
0.773973
[ "MIT" ]
211network/LunaMultiplayer
Server/Properties/AssemblyInfo.cs
733
C#
// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------------------------------------------ using Xunit; using Xunit.Abstractions; namespace Microsoft.PSharp.TestingServices.Tests { public class MonitorWildCardEventTest : BaseTest { public MonitorWildCardEventTest(ITestOutputHelper output) : base(output) { } private class M1 : Monitor { [Start] [IgnoreEvents(typeof(WildCardEvent))] private class S0 : MonitorState { } } private class M2 : Monitor { [Start] [OnEventDoAction(typeof(WildCardEvent), nameof(Check))] private class S0 : MonitorState { } private void Check() { this.Assert(false, "Check reached."); } } private class M3 : Monitor { [Start] [OnEventGotoState(typeof(WildCardEvent), typeof(S1))] private class S0 : MonitorState { } [OnEntry(nameof(Check))] private class S1 : MonitorState { } private void Check() { this.Assert(false, "Check reached."); } } private class E1 : Event { } private class E2 : Event { } private class E3 : Event { } [Fact(Timeout=5000)] public void TestIgnoreWildCardEvent() { this.Test(r => { r.RegisterMonitor(typeof(M1)); r.InvokeMonitor<M1>(new E1()); r.InvokeMonitor<M1>(new E2()); r.InvokeMonitor<M1>(new E3()); }); } [Fact(Timeout = 5000)] public void TestDoActionOnWildCardEvent() { this.TestWithError(r => { r.RegisterMonitor(typeof(M2)); r.InvokeMonitor<M2>(new E1()); }, expectedError: "Check reached."); } [Fact(Timeout = 5000)] public void TestGotoStateOnWildCardEvent() { this.TestWithError(r => { r.RegisterMonitor(typeof(M3)); r.InvokeMonitor<M3>(new E1()); }, expectedError: "Check reached."); } } }
25.429907
100
0.438074
[ "MIT" ]
alexsyeo/PSharp
Tests/TestingServices.Tests/Specifications/Monitors/MonitorWildCardEventTest.cs
2,723
C#
namespace SFA.Apprenticeships.Application.Candidate.Strategies.Apprenticeships { using System; using Domain.Entities.Applications; using Domain.Interfaces.Messaging; using Domain.Interfaces.Repositories; public class SaveApprenticeshipApplicationStrategy : ISaveApprenticeshipApplicationStrategy { private readonly IApprenticeshipApplicationReadRepository _apprenticeshipApplicationReadRepository; private readonly IApprenticeshipApplicationWriteRepository _apprenticeshipApplicationWriteRepository; private readonly ICandidateReadRepository _candidateReadRepository; private readonly ICandidateWriteRepository _candidateWriteRepository; public SaveApprenticeshipApplicationStrategy( IApprenticeshipApplicationReadRepository apprenticeshipApplicationReadRepository, IApprenticeshipApplicationWriteRepository apprenticeshipApplicationWriteRepository, ICandidateReadRepository candidateReadRepository, ICandidateWriteRepository candidateWriteRepository) { _apprenticeshipApplicationReadRepository = apprenticeshipApplicationReadRepository; _apprenticeshipApplicationWriteRepository = apprenticeshipApplicationWriteRepository; _candidateReadRepository = candidateReadRepository; _candidateWriteRepository = candidateWriteRepository; } public ApprenticeshipApplicationDetail SaveApplication(Guid candidateId, int vacancyId, ApprenticeshipApplicationDetail apprenticeshipApplication) { var currentApplication = _apprenticeshipApplicationReadRepository.GetForCandidate(candidateId, vacancyId, true); currentApplication.AssertState("Save apprenticeship application", ApplicationStatuses.Draft); currentApplication.CandidateInformation = apprenticeshipApplication.CandidateInformation; currentApplication.AdditionalQuestion1Answer = apprenticeshipApplication.AdditionalQuestion1Answer; currentApplication.AdditionalQuestion2Answer = apprenticeshipApplication.AdditionalQuestion2Answer; var savedApplication = _apprenticeshipApplicationWriteRepository.Save(currentApplication); SyncToCandidateApplicationTemplate(candidateId, savedApplication); return savedApplication; } private void SyncToCandidateApplicationTemplate(Guid candidateId, ApprenticeshipApplicationDetail apprenticeshipApplication) { var candidate = _candidateReadRepository.Get(candidateId); candidate.ApplicationTemplate.AboutYou = apprenticeshipApplication.CandidateInformation.AboutYou; candidate.ApplicationTemplate.EducationHistory = apprenticeshipApplication.CandidateInformation.EducationHistory; candidate.ApplicationTemplate.Qualifications = apprenticeshipApplication.CandidateInformation.Qualifications; candidate.ApplicationTemplate.WorkExperience = apprenticeshipApplication.CandidateInformation.WorkExperience; candidate.ApplicationTemplate.TrainingCourses = apprenticeshipApplication.CandidateInformation.TrainingCourses; if (!candidate.MonitoringInformation.DisabilityStatus.HasValue && apprenticeshipApplication.CandidateInformation.DisabilityStatus.HasValue) { candidate.MonitoringInformation.DisabilityStatus = apprenticeshipApplication.CandidateInformation.DisabilityStatus; } _candidateWriteRepository.Save(candidate); } } }
56.984127
154
0.78663
[ "MIT" ]
BugsUK/FindApprenticeship
src/SFA.Apprenticeships.Application.Candidate/Strategies/Apprenticeships/SaveApprenticeshipApplicationStrategy.cs
3,592
C#
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.IO; namespace ICSharpCode.AspNet.Mvc { public class MvcControllerFileName : MvcFileName { string controllerName = String.Empty; public string ControllerName { get { EnsureControllerNameIsNotNull(); return controllerName; } set { controllerName = value; } } void EnsureControllerNameIsNotNull() { controllerName = ConvertToEmptyStringIfNull(controllerName); } public MvcTextTemplateLanguage Language { get; set; } public override string GetFileName() { string name = GetControllerName(); return name + GetFileExtension(); } string GetControllerName() { if (controllerName != null) { return controllerName; } return "Default1Controller"; } string GetFileExtension() { return MvcTextTemplateFileNameExtension.GetControllerFileExtension(Language); } public bool HasValidControllerName() { return !String.IsNullOrEmpty(controllerName); } } }
22
103
0.722127
[ "MIT" ]
Plankankul/SharpDevelop-w-Framework
src/AddIns/BackendBindings/AspNet.Mvc/Project/Src/MvcControllerFileName.cs
1,168
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Spark.TfsExplorer.Models.Folders { public interface IInstallerFolder : IBranchFolder { TriggerFolder Trigger { get; } PublishHistoryFolder PublishHistory { get; } } }
21.533333
53
0.733746
[ "MIT" ]
jackobo/jackobs-code
DeveloperTool/src/TfsExplorer/Models/Folders/IInstallerFolder.cs
325
C#
using System.Collections.Generic; public partial class Config { public readonly NPCSetting NPCSetting = new NPCSetting() { timeFactor = 3.1415f, npcCount = 10, assetPath = "http://download.game.com" }; };
27.666667
62
0.618474
[ "MIT" ]
flyingSnow-hu/ConfigGenerator
demo/Assets/Config/Gen/NPCSetting.cs
249
C#
using Panda.Models; using System; using System.Collections.Generic; namespace Panda.Services { public interface IUserService { void AddUser(string username, string email, string password); User GetUserByUsernameAndPassword(string username, string password); IList<User> GetAllUsers(); string GetUserIdByUsername(string username); string GetUsernameById(string id); } }
26.4375
76
0.716312
[ "MIT" ]
kovachevmartin/SoftUni
Web/PastExams/04-Nov-2018_Panda/Panda.Services/IUserService.cs
425
C#
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ // **NOTE** This file was generated by a tool and any changes will be overwritten. // <auto-generated/> // Template Source: IEntityCollectionReferencesRequestBuilder.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; /// <summary> /// The interface IEducationClassMembersCollectionReferencesRequestBuilder. /// </summary> public partial interface IEducationClassMembersCollectionReferencesRequestBuilder : IBaseRequestBuilder { /// <summary> /// Builds the request. /// </summary> /// <returns>The built request.</returns> IEducationClassMembersCollectionReferencesRequest Request(); /// <summary> /// Builds the request. /// </summary> /// <param name="options">The query and header options for the request.</param> /// <returns>The built request.</returns> IEducationClassMembersCollectionReferencesRequest Request(IEnumerable<Option> options); } }
40.121212
153
0.609517
[ "MIT" ]
Aliases/msgraph-sdk-dotnet
src/Microsoft.Graph/Generated/requests/IEducationClassMembersCollectionReferencesRequestBuilder.cs
1,324
C#
using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using ESFA.DC.ESF.Interfaces.DataAccessLayer; using ESFA.DC.ESF.Interfaces.Reports.Services; using ESFA.DC.ESF.Models; namespace ESFA.DC.ESF.ReportingService.Services { public class ILRService : IILRService { private readonly IFM70Repository _repository; private readonly ILegacyILRService _legacyIlrService; public ILRService( IFM70Repository repository, ILegacyILRService legacyILRService) { _repository = repository; _legacyIlrService = legacyILRService; } public async Task<IEnumerable<ILRFileDetailsModel>> GetIlrFileDetails(int ukPrn, CancellationToken cancellationToken) { ILRFileDetailsModel ilrFileData = await _repository.GetFileDetails(ukPrn, cancellationToken); IEnumerable<ILRFileDetailsModel> previousYearsFiles = await _legacyIlrService.GetPreviousYearsILRFileDetails(ukPrn, cancellationToken); var ilrYearlyFileData = new List<ILRFileDetailsModel>(); if (previousYearsFiles != null) { ilrYearlyFileData.AddRange(previousYearsFiles.OrderBy(fd => fd.Year)); } ilrYearlyFileData.Add(ilrFileData); return ilrYearlyFileData; } public async Task<IEnumerable<FM70PeriodisedValuesYearlyModel>> GetYearlyIlrData(int ukPrn, CancellationToken cancellationToken) { IList<FM70PeriodisedValuesModel> ilrData = await _repository.GetPeriodisedValues(ukPrn, cancellationToken); var previousYearsILRData = await _legacyIlrService.GetPreviousYearsFM70Data(ukPrn, cancellationToken); var allILRData = new List<FM70PeriodisedValuesModel>(); if (previousYearsILRData != null) { allILRData.AddRange(previousYearsILRData); } allILRData.AddRange(ilrData); var fm70YearlyData = GroupFm70DataIntoYears(allILRData); return fm70YearlyData; } private IEnumerable<FM70PeriodisedValuesYearlyModel> GroupFm70DataIntoYears(IList<FM70PeriodisedValuesModel> fm70Data) { var yearlyFm70Data = new List<FM70PeriodisedValuesYearlyModel>(); if (fm70Data == null) { return yearlyFm70Data; } var groupings = fm70Data.GroupBy(sd => sd.FundingYear); foreach (var yearGroup in groupings) { yearlyFm70Data.Add(new FM70PeriodisedValuesYearlyModel { FundingYear = yearGroup.Key, Fm70PeriodisedValues = yearGroup.ToList() }); } return yearlyFm70Data; } } }
36.253165
147
0.653282
[ "MIT" ]
SkillsFundingAgency/DC-ESF
src/ESFA.DC.ESF.ReportingService/Services/ILRService.cs
2,866
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.269 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Delta { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class EmbeddedContent { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal EmbeddedContent() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Delta.EmbeddedContent", typeof(EmbeddedContent).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static byte[] DeltaEffect { get { object obj = ResourceManager.GetObject("DeltaEffect", resourceCulture); return ((byte[])(obj)); } } internal static byte[] SimpleEffect { get { object obj = ResourceManager.GetObject("SimpleEffect", resourceCulture); return ((byte[])(obj)); } } internal static byte[] TinyFont { get { object obj = ResourceManager.GetObject("TinyFont", resourceCulture); return ((byte[])(obj)); } } } }
40.482353
172
0.58297
[ "MIT" ]
bostelk/delta
Delta.Core/EmbeddedContent.Designer.cs
3,443
C#
using System; using System.Text.Json.Serialization; namespace graphqlapi.Models { public class Meta : Element { [JsonPropertyName("versionId")] public string VersionId { get; set; } [JsonPropertyName("lastUpdated")] public DateTime LastUpdated { get; set; } [JsonPropertyName("source")] public Uri Source { get; set; } [JsonPropertyName("language")] public string Language { get; set; } } }
22.47619
49
0.620763
[ "MIT" ]
microsoft/blazor-graphql-starter-kit
graphqlapi/Models/Meta.cs
474
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CreateChangeSet Request Marshaller /// </summary> public class CreateChangeSetRequestMarshaller : IMarshaller<IRequest, CreateChangeSetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateChangeSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChangeSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CreateChangeSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCapabilities()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Capabilities) { request.Parameters.Add("Capabilities" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetChangeSetType()) { request.Parameters.Add("ChangeSetType", StringUtils.FromString(publicRequest.ChangeSetType)); } if(publicRequest.IsSetClientToken()) { request.Parameters.Add("ClientToken", StringUtils.FromString(publicRequest.ClientToken)); } if(publicRequest.IsSetDescription()) { request.Parameters.Add("Description", StringUtils.FromString(publicRequest.Description)); } if(publicRequest.IsSetIncludeNestedStacks()) { request.Parameters.Add("IncludeNestedStacks", StringUtils.FromBool(publicRequest.IncludeNestedStacks)); } if(publicRequest.IsSetNotificationARNs()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.NotificationARNs) { request.Parameters.Add("NotificationARNs" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetParameters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Parameters) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetResourcesToImport()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourcesToImport) { if(publicRequestlistValue.IsSetLogicalResourceId()) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "LogicalResourceId", StringUtils.FromString(publicRequestlistValue.LogicalResourceId)); } if(publicRequestlistValue.IsSetResourceIdentifier()) { int mapIndex = 1; foreach(var key in publicRequestlistValue.ResourceIdentifier.Keys) { String value; bool hasValue = publicRequestlistValue.ResourceIdentifier.TryGetValue(key, out value); request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceIdentifier" + "." + "entry" + "." + mapIndex + "." + "key", StringUtils.FromString(key)); if (hasValue) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceIdentifier" + "." + "entry" + "." + mapIndex + "." + "value", StringUtils.FromString(value)); } mapIndex++; } } if(publicRequestlistValue.IsSetResourceType()) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceType", StringUtils.FromString(publicRequestlistValue.ResourceType)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetResourceTypes()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourceTypes) { request.Parameters.Add("ResourceTypes" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRoleARN()) { request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN)); } if(publicRequest.IsSetRollbackConfiguration()) { if(publicRequest.RollbackConfiguration.IsSetMonitoringTimeInMinutes()) { request.Parameters.Add("RollbackConfiguration" + "." + "MonitoringTimeInMinutes", StringUtils.FromInt(publicRequest.RollbackConfiguration.MonitoringTimeInMinutes)); } if(publicRequest.RollbackConfiguration.IsSetRollbackTriggers()) { int publicRequestRollbackConfigurationlistValueIndex = 1; foreach(var publicRequestRollbackConfigurationlistValue in publicRequest.RollbackConfiguration.RollbackTriggers) { if(publicRequestRollbackConfigurationlistValue.IsSetArn()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Arn", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Arn)); } if(publicRequestRollbackConfigurationlistValue.IsSetType()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Type", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Type)); } publicRequestRollbackConfigurationlistValueIndex++; } } } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } if(publicRequest.IsSetTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Tags) { if(publicRequestlistValue.IsSetKey()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Key", StringUtils.FromString(publicRequestlistValue.Key)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateBody()) { request.Parameters.Add("TemplateBody", StringUtils.FromString(publicRequest.TemplateBody)); } if(publicRequest.IsSetTemplateURL()) { request.Parameters.Add("TemplateURL", StringUtils.FromString(publicRequest.TemplateURL)); } if(publicRequest.IsSetUsePreviousTemplate()) { request.Parameters.Add("UsePreviousTemplate", StringUtils.FromBool(publicRequest.UsePreviousTemplate)); } } return request; } private static CreateChangeSetRequestMarshaller _instance = new CreateChangeSetRequestMarshaller(); internal static CreateChangeSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChangeSetRequestMarshaller Instance { get { return _instance; } } } }
53.204918
271
0.533431
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/CloudFormation/Generated/Model/Internal/MarshallTransformations/CreateChangeSetRequestMarshaller.cs
12,982
C#
using Microsoft.Maui.Controls; using System; using System.Collections.Generic; using System.Collections.Specialized; namespace InputKit.Shared.Controls; public class AutoCompleteView : Entry { private static readonly Func<string, ICollection<string>, ICollection<string>> _defaultSortingAlgorithm = (t, d) => d; public static readonly BindableProperty SortingAlgorithmProperty = BindableProperty.Create(nameof(SortingAlgorithm), typeof(Func<string, ICollection<string>, ICollection<string>>), typeof(AutoCompleteView), _defaultSortingAlgorithm); public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource), typeof(IEnumerable<string>), typeof(AutoCompleteView), default(IEnumerable<string>), propertyChanged: OnItemsSourcePropertyChangedInternal); public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem), typeof(object), typeof(AutoCompleteView), default, BindingMode.OneWayToSource); public static readonly BindableProperty ThresholdProperty = BindableProperty.Create(nameof(Threshold), typeof(int), typeof(AutoCompleteView), 2); public AutoCompleteView() { // Keep the ctor for linker. } /// <summary> /// Sorting Algorithm for the drop down list. This is a bindable property. /// </summary> /// <example> /// <![CDATA[ /// SortingAlgorithm = (text, values) => values /// .Where(t => t.ToLower().StartsWith(text.ToLower())) /// .OrderBy(x => x) /// .ToList(); /// ]]> /// </example> public Func<string, ICollection<string>, ICollection<string>> SortingAlgorithm { get => (Func<string, ICollection<string>, ICollection<string>>)GetValue(SortingAlgorithmProperty); set => SetValue(SortingAlgorithmProperty, value); } /// <summary> /// The number of characters the user must type before the dropdown is shown. This is a bindable property. /// </summary> public int Threshold { get => (int)GetValue(ThresholdProperty); set => SetValue(ThresholdProperty, value); } /// <summary> /// Item selected from the DropDown List. This is a bindable property. /// </summary> public object SelectedItem { get => GetValue(SelectedItemProperty); set => SetValue(SelectedItemProperty, value); } /// <summary> /// Drop Down List Items Source. This is a bindable property. /// </summary> public IEnumerable<string> ItemsSource { get => (IEnumerable<string>)GetValue(ItemsSourceProperty); set => SetValue(ItemsSourceProperty, value); } public event EventHandler<SelectedItemChangedEventArgs> ItemSelected; internal void OnItemSelectedInternal(object sender, SelectedItemChangedEventArgs args) { SelectedItem = args.SelectedItem; ItemSelected?.Invoke(sender, args); OnItemSelected(args); } private static void OnItemsSourcePropertyChangedInternal(BindableObject bindable, object oldvalue, object newvalue) { var combo = (AutoCompleteView)bindable; var observableOld = oldvalue as INotifyCollectionChanged; var observableNew = newvalue as INotifyCollectionChanged; combo.OnItemsSourcePropertyChanged(combo, oldvalue, newvalue); if (observableOld != null) { observableOld.CollectionChanged -= combo.OnCollectionChangedInternal; } if (observableNew != null) { observableNew.CollectionChanged += combo.OnCollectionChangedInternal; } } public event EventHandler<NotifyCollectionChangedEventArgs> CollectionChanged; private void OnCollectionChangedInternal(object sender, NotifyCollectionChangedEventArgs args) { CollectionChanged?.Invoke(sender, args); } public virtual void RaiseTextChanged(string text) { Text = text; } protected virtual void OnItemsSourcePropertyChanged(AutoCompleteView bindable, object oldvalue, object newvalue) { } protected virtual void OnItemSelected(SelectedItemChangedEventArgs args) { } }
35.090164
122
0.686522
[ "MIT" ]
enisn/Xamarin.Forms.InputK
src/InputKit/Shared/Controls/AutoCompleteView.cs
4,283
C#
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using Mips.Data; using Mips.Io; namespace Mips.Commands { public abstract class MipsMessage { public static readonly MipsMessage[] EmptyArray = new MipsMessage[0]; protected MipsCommand command; internal DateTime createdDateTime; internal long createdTimestamp; public MipsMessage(MipsCommand command) { this.command = command; createdDateTime = DateTime.UtcNow; createdTimestamp = System.Diagnostics.Stopwatch.GetTimestamp(); } public MipsCommand Command => command; // public virtual string CommandAndKey => Command.ToString(); public static MipsMessage Create(MipsCommand command) { return new CommandMessage(command); } public static MipsMessage Create(MipsCommand command, MipsSignalTable signalTable) { return new CommandSignalTableMessage(command, signalTable); } public static MipsMessage Create(MipsCommand command, CompressionTable compressionTable) { return new CommandCompressionTableMessage(command,compressionTable); } public static MipsMessage Create(MipsCommand command, int value) { return new CommandValueMessage(command, value); } public static MipsMessage CreateTable(MipsCommand command, string value) { return new CommandTableValueMessage(command, value); } public static MipsMessage Create(MipsCommand command, string value) { return new CommandValueMessage(command, value); } public static MipsMessage Create(MipsCommand command, bool value) { return new CommandValueMessage(command, value); } public static MipsMessage Create(MipsCommand command, double value) { return new CommandValueMessage(command, value); } public static MipsMessage Create(MipsCommand command, int value1, int value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, string value1, string value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, int value1, string value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, int value1, double value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, string value1, double value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, double value1, double value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, string value1, int value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, string value1, BitArray value2) { return new CommandValueValueMessage(command, value1, value2); } public static MipsMessage Create(MipsCommand command, int value1, int value2, int value3) { return new CommandValueValueValueMessage(command, value1, value2, value3); } public static MipsMessage Create(MipsCommand command, int value1, string value2, int value3) { return new CommandValueValueValueMessage(command, value1, value2, value3); } public static MipsMessage Create(MipsCommand command, string value1, int value2, double value3) { return new CommandValueValueValueMessage(command, value1, value2, value3); } public static MipsMessage Create(MipsCommand command, string value1, string value2, int value3) { return new CommandValueValueValueMessage(command, value1, value2, value3); } public static MipsMessage Create(MipsCommand command, int value1, int value2, string value3) { return new CommandValueValueValueMessage(command, value1, value2, value3); } public static MipsMessage Create(MipsCommand command, string value1, string value2, int value3,int value4,int value5) { return new CommandValuesMessage(command, value1, value2, value3,value4,value5); } public static MipsMessage Create(MipsCommand command, string value1,IEnumerable<int> values) { return new CommandValueEnumerableMessage(command, value1, values); } public static MipsMessage Create(MipsCommand command, IEnumerable<int> values) { return new CommandEnumerableMessage(command, values); } public static MipsMessage Create(MipsCommand command, IEnumerable<string> values) { return new CommandEnumerableMessage(command, values); } public static MipsMessage Create(MipsCommand command, IEnumerable<double> values) { return new CommandEnumerableMessage(command, values); } public static MipsMessage Create(MipsCommand command, int value,IEnumerable<int> values) { return new CommandValueEnumerableMessage(command, value,values); } internal abstract void WriteImpl(IMipsCommunicator physical); private string Read(MipsCommunicator physical) { return physical.ReadLine(); } public void WriteTo(IMipsCommunicator physical) { try { this.WriteImpl(physical); } catch { throw new InvalidOperationException(); } } public override string ToString() { return this.Command.ToString(); } } internal class CommandTableValueMessage : MipsMessage { private byte[] value; public CommandTableValueMessage(MipsCommand command, string table):base(command) { this.value = Encoding.ASCII.GetBytes(table); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value, ";"); physical.WriteEnd(";"); } } internal class CommandEnumerableMessage : CommandBase { private byte[][] bytevalue; public CommandEnumerableMessage(MipsCommand command, IEnumerable<int> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; foreach (var value in values) { byte[] result = Encoding.ASCII.GetBytes(value.ToString()); bytevalue[i] = result; i++; } } public CommandEnumerableMessage(MipsCommand command, IEnumerable<string> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; foreach (var value in values) { byte[] result = Encoding.ASCII.GetBytes(value); bytevalue[i] = result; i++; } } public CommandEnumerableMessage(MipsCommand command, IEnumerable<double> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; foreach (var value in values) { byte[] result = Encoding.ASCII.GetBytes(value.ToString()); bytevalue[i] = result; i++; } } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); foreach (var value in bytevalue) { physical.Write(value, ","); } physical.WriteEnd(); } } internal class CommandValueEnumerableMessage : CommandBase { private byte[][] bytevalue; private readonly byte[] value; public CommandValueEnumerableMessage(MipsCommand command,int value, IEnumerable<int> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; this.value = Encoding.ASCII.GetBytes(value.ToString()); foreach (var val in values) { byte[] result = Encoding.ASCII.GetBytes(val.ToString()); bytevalue[i] = result; i++; } } public CommandValueEnumerableMessage(MipsCommand command, string value, IEnumerable<int> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; this.value = Encoding.ASCII.GetBytes(value); foreach (var val in values) { byte[] result = Encoding.ASCII.GetBytes(val.ToString()); bytevalue[i] = result; i++; } } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(this.value, ","); foreach (var val in bytevalue) { physical.Write(val, ","); } physical.WriteEnd(); } } internal abstract class CommandBase : MipsMessage { public CommandBase(MipsCommand command) : base(command) { } } internal sealed class CommandMessage : CommandBase { public CommandMessage(MipsCommand command) : base(command) { } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.WriteEnd(); } } internal sealed class CommandCompressionTableMessage : CommandBase { private readonly byte[] value; public CommandCompressionTableMessage(MipsCommand command, CompressionTable compressionTable) : base(command) { this.value = Encoding.ASCII.GetBytes(compressionTable.RetrieveTableAsEncodedString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value, ","); physical.WriteEnd(); } } internal sealed class CommandSignalTableMessage : CommandBase { private readonly byte[] value; public CommandSignalTableMessage(MipsCommand command, MipsSignalTable signalTable) : base(command) { this.value = Encoding.ASCII.GetBytes(signalTable.RetrieveTableAsEncodedString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value, ";"); physical.WriteEnd(";"); } } internal sealed class CommandValueMessage : CommandBase { private readonly byte[] value; public CommandValueMessage(MipsCommand command, int value) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); } public CommandValueMessage(MipsCommand command, bool value) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); } public CommandValueMessage(MipsCommand command, double value) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); } public CommandValueMessage(MipsCommand command, string value) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value, ","); physical.WriteEnd(); } } internal class CommandValueValueMessage : CommandBase { private readonly byte[] value1; private readonly byte[] value2; public CommandValueValueMessage(MipsCommand command, int value1, int value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, string value1, string value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, int value1, string value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, int value1, double value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, string value1, double value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, double value1, double value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, string value1, int value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); } public CommandValueValueMessage(MipsCommand command, string value1, BitArray value2) : base(command) { StringBuilder sb = new StringBuilder(); foreach (var b in value2) { sb.Append((bool)b ? "1" : "0"); } this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(sb.ToString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value1, ","); physical.Write(value2, ","); physical.WriteEnd(); } } internal sealed class CommandValueValueValueMessage : CommandBase { private readonly byte[] value1; private readonly byte[] value2; private readonly byte[] value3; public CommandValueValueValueMessage(MipsCommand command, int value1, int value2, int value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); } public CommandValueValueValueMessage(MipsCommand command, int value1, string value2, int value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); } public CommandValueValueValueMessage(MipsCommand command, int value1, int value2, string value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); } public CommandValueValueValueMessage(MipsCommand command, string value1, int value2, double value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); } public CommandValueValueValueMessage(MipsCommand command, string value1, string value2, int value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value1, ","); physical.Write(value2, ","); physical.Write(value3, ","); physical.WriteEnd(); } } internal class CommandValuesMessage : CommandBase { private readonly byte[] value1; private readonly byte[] value2; private readonly byte[] value3; private readonly byte[] value4; private readonly byte[] value5; public CommandValuesMessage(MipsCommand command, string value1, string value2, int value3, int value4, int value5) : base(command) { this.command = command; this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); this.value4 = Encoding.ASCII.GetBytes(value4.ToString()); this.value5 = Encoding.ASCII.GetBytes(value5.ToString()); } internal override void WriteImpl(IMipsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value1, ","); physical.Write(value2, ","); physical.Write(value3, ","); physical.Write(value4, ","); physical.Write(value5, ","); physical.WriteEnd(); } } }
30.875984
132
0.721709
[ "MIT" ]
PNNL-Comp-Mass-Spec/AmpsSDK
Mips-net/Commands/MipsMessage.cs
15,687
C#
using Sandbox; namespace Fortwars { public static class DamageInfoExtension { public static DamageInfo FromFall( float damage, Entity attacker ) { return new DamageInfo { Flags = DamageFlags.Fall, Damage = damage, Attacker = attacker }; } public static DamageInfo FromProjectile( float damage, Vector3 position, Vector3 force, Entity attacker ) { return new DamageInfo { Flags = DamageFlags.Blast, Position = position, Damage = damage, Attacker = attacker, Force = force, }; } } }
18.3
107
0.672131
[ "MIT" ]
DevulTj/sbox-fortwars
code/util/DamageInfoExtension.cs
551
C#
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Collections.Generic; using System.Diagnostics.ContractsLight; namespace BuildXL.Cache.Interfaces { /// <summary> /// A struct that contains the cache statistics and the cache ID from /// which the statistics came. /// </summary> public readonly struct CacheSessionStatistics : System.IEquatable<CacheSessionStatistics> { /// <summary> /// The CacheId of the cache these statistics are about /// </summary> public readonly CacheId CacheId; /// <summary> /// A string representation of the underlying cache type /// </summary> /// <remarks> /// This can simply be the .Net type, or some other unique string to represent /// this cache implementation. /// </remarks> public readonly string CacheType; /// <summary> /// A dictionary of statistic names and values. This /// </summary> public readonly Dictionary<string, double> Statistics; /// <summary> /// Basic constructor to make the read-only CacheSessionStatistics /// </summary> /// <param name="cacheId">CacheI of these statistics</param> /// <param name="statistics">The statistics dictionary</param> /// <param name="cacheType">The .Net type name for the cache.</param> public CacheSessionStatistics(CacheId cacheId, string cacheType, Dictionary<string, double> statistics) { Contract.Requires(cacheId != null); Contract.Requires(statistics != null); CacheId = cacheId; Statistics = statistics; CacheType = cacheType; } // Needed to keep FxCop happy /// <inheritdoc /> public override int GetHashCode() { return Statistics.GetHashCode(); } /// <inheritdoc /> public override bool Equals(object obj) { return (obj is CacheSessionStatistics) && Equals((CacheSessionStatistics)obj); } /// <nodoc /> bool System.IEquatable<CacheSessionStatistics>.Equals(CacheSessionStatistics other) { return object.ReferenceEquals(Statistics, other.Statistics) && CacheId.Equals(other); } /// <nodoc /> public static bool operator ==(CacheSessionStatistics left, CacheSessionStatistics right) { return left.Equals(right); } /// <nodoc /> public static bool operator !=(CacheSessionStatistics left, CacheSessionStatistics right) { return !left.Equals(right); } } }
33.722892
112
0.588424
[ "MIT" ]
BearerPipelineTest/BuildXL
Public/Src/Cache/VerticalStore/Interfaces/CacheSessionStatistics.cs
2,799
C#
using PnP.Scanning.Core.Authentication; using PnP.Scanning.Core.Services; using System.CommandLine; using System.CommandLine.Binding; namespace PnP.Scanning.Process.Commands { internal sealed class StartBinder : BinderBase<StartOptions> { private readonly Option<Mode> mode; private readonly Option<string> tenant; private readonly Option<List<string>> sitesList; private readonly Option<FileInfo> sitesFile; private readonly Option<AuthenticationMode> authMode; private readonly Option<Guid> applicationId; private readonly Option<string> tenantId; private readonly Option<string> certPath; private readonly Option<FileInfo> certFile; private readonly Option<string> certPassword; private readonly Option<int> threads; // PER SCAN COMPONENT: implement scan component specific options private readonly Option<bool> syntexDeepScan; private readonly Option<bool> workflowAnalyze; #if DEBUG private readonly Option<int> testNumberOfSites; #endif public StartBinder(Option<Mode> modeInput, Option<string> tenantInput, Option<List<string>> sitesListInput, Option<FileInfo> sitesFileInput, Option<AuthenticationMode> authModeInput, Option<Guid> applicationIdInput, Option<string> tenantIdInput, Option<string> certPathInput, Option<FileInfo> certFileInput, Option<string> certPasswordInput, Option<int> threadsInput // PER SCAN COMPONENT: implement scan component specific options , Option<bool> syntexDeepScanInput , Option<bool> workflowAnalyzeInput #if DEBUG , Option<int> testNumberOfSitesInput #endif ) { mode = modeInput; tenant = tenantInput; sitesList = sitesListInput; sitesFile = sitesFileInput; authMode = authModeInput; applicationId = applicationIdInput; tenantId = tenantIdInput; certPath = certPathInput; certFile = certFileInput; certPassword = certPasswordInput; threads = threadsInput; // PER SCAN COMPONENT: implement scan component specific options syntexDeepScan = syntexDeepScanInput; workflowAnalyze = workflowAnalyzeInput; #if DEBUG testNumberOfSites = testNumberOfSitesInput; #endif } protected override StartOptions GetBoundValue(BindingContext bindingContext) => new() { Mode = bindingContext.ParseResult.GetValueForOption(mode), Tenant = bindingContext.ParseResult.GetValueForOption(tenant), SitesList = bindingContext.ParseResult.GetValueForOption(sitesList), SitesFile = bindingContext.ParseResult.GetValueForOption(sitesFile), AuthMode = bindingContext.ParseResult.GetValueForOption(authMode), ApplicationId = bindingContext.ParseResult.GetValueForOption(applicationId), TenantId = bindingContext.ParseResult.GetValueForOption(tenantId), CertPath = bindingContext.ParseResult.GetValueForOption(certPath), CertFile = bindingContext.ParseResult.GetValueForOption(certFile), CertPassword = bindingContext.ParseResult.GetValueForOption(certPassword), Threads = bindingContext.ParseResult.GetValueForOption(threads), // PER SCAN COMPONENT: implement scan component specific options SyntexDeepScan = bindingContext.ParseResult.GetValueForOption(syntexDeepScan), WorkflowAnalyze = bindingContext.ParseResult.GetValueForOption(workflowAnalyze), #if DEBUG TestNumberOfSites = bindingContext.ParseResult.GetValueForOption(testNumberOfSites), #endif }; } }
48.097561
252
0.675456
[ "MIT" ]
pnp/pnpscanning
src/PnP.Scanning/PnP.Scanning.Process/Commands/Options/StartBinder.cs
3,946
C#
// Copyright 2009 Andy Kernahan // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; namespace AK.F1.Timing.Model.Collections { /// <summary> /// An <see cref="System.Collections.ObjectModel.ObservableCollection&lt;T&gt;"/> which can /// be explicitly sorted. /// </summary> /// <typeparam name="T">The collection item type.</typeparam> [Serializable] public class SortableObservableCollection<T> : ObservableCollection<T> { #region Public Interface. /// <summary> /// Initialises a new instance of the <see cref="SortableObservableCollection&lt;T&gt;"/> /// class and specifies the <paramref name="comparison"/> used to compare /// <typeparamref name="T"/>. /// </summary> /// <param name="comparison">The comparison used to compare <typeparamref name="T"/>.</param> /// <exception cref="System.ArgumentNullException"> /// Throw when <paramref name="comparison"/> is <see langword="null"/>. /// </exception> public SortableObservableCollection(Comparison<T> comparison) { Guard.NotNull(comparison, "comparison"); Comparer = new DelegateComparer<T>(comparison); } /// <summary> /// Sorts the collection. /// </summary> public void Sort() { if(Items.Count > 1) { SyncOrderWith(Items.OrderBy(item => item, Comparer)); } } #endregion #region Private Impl. private void SyncOrderWith(IEnumerable<T> sortedItems) { int i = 0; foreach(var item in sortedItems) { if(Comparer.Compare(item, this[i]) != 0) { Move(IndexOf(item, i), i); } ++i; } } private int IndexOf(T item, int index) { for(int i = index; i < Items.Count; ++i) { if(Comparer.Compare(item, Items[i]) == 0) { return i; } } return -1; } private IComparer<T> Comparer { get; set; } #endregion } }
30.478723
101
0.569983
[ "Apache-2.0" ]
andykernahan/ak-f1-timing
src/AK.F1.Timing.Model/src/Collections/SortableObservableCollection.cs
2,865
C#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using SN_Net.MiscClass; using SN_Net.DataModels; using WebAPI; using WebAPI.ApiResult; using Newtonsoft.Json; namespace SN_Net.Subform { public enum USER_LEVEL : int { SUPPORT = 0, SALES = 1, ACCOUNT = 2, SUPERVISOR = 8, ADMIN = 9 } public partial class UsersList : Form { private List<Users> users; private MainForm main_form; public UsersList(MainForm main_form) { InitializeComponent(); this.main_form = main_form; } private void UsersList_Load(object sender, EventArgs e) { // Adding users level selection this.cbUserLevel.Items.Add(new ComboboxItem("ADMIN", 9, "")); this.cbUserLevel.Items.Add(new ComboboxItem("SUPERVISOR", 8, "")); this.cbUserLevel.Items.Add(new ComboboxItem("SUPPORT", 0, "")); this.cbUserLevel.Items.Add(new ComboboxItem("SALES", 1, "")); this.cbUserLevel.Items.Add(new ComboboxItem("ACCOUNT", 2, "")); this.cbUserLevel.SelectedItem = this.cbUserLevel.Items[2]; // Adding users status selection this.cbUserStatus.Items.Add(new ComboboxItem("ปกติ", 0, "N")); this.cbUserStatus.Items.Add(new ComboboxItem("ห้ามใช้", 0, "X")); this.cbUserStatus.SelectedItem = this.cbUserStatus.Items[0]; // Adding allow web login selection this.cbWebLogin.Items.Add(new ComboboxItem("No", 0, "N")); this.cbWebLogin.Items.Add(new ComboboxItem("Yes", 0, "Y")); this.cbWebLogin.SelectedItem = this.cbWebLogin.Items[0]; this.numMaxAbsent.Value = 10; this.numMaxAbsent.Enter += delegate { this.numMaxAbsent.Select(0, this.numMaxAbsent.Text.Length); }; this.cbUserLevel.GotFocus += new EventHandler(this.ShowComboBoxItemOnFocused); this.cbUserStatus.GotFocus += new EventHandler(this.ShowComboBoxItemOnFocused); this.cbWebLogin.GotFocus += new EventHandler(this.ShowComboBoxItemOnFocused); this.loadUserListData(); //foreach (Control ct in this.groupBox1.Controls) //{ // ct.KeyDown += new KeyEventHandler(this.enterKeyDetect); //} } private void ShowComboBoxItemOnFocused(object sender, EventArgs e) { SendKeys.Send("{F6}"); } //private void enterKeyDetect(object sender, KeyEventArgs e) //{ // if (e.KeyCode == Keys.Enter) // { // Control curr_control = sender as Control; // int curr_index = curr_control.TabIndex; // foreach (Control c in this.groupBox1.Controls) // { // if (c.TabIndex == curr_index + 1 && c.TabStop == true) // { // c.Focus(); // if (c is ComboBox) // { // ComboBox combo = c as ComboBox; // combo.DroppedDown = true; // } // break; // } // } // } //} private void btnCancelAddUser_Click(object sender, EventArgs e) { this.clearForm(); } private void btnAddUser_Click(object sender, EventArgs e) { if (this.txtUserName.Text.Length > 0 && this.txtEmail.Text.Length > 0) { string username = this.txtUserName.Text; string name = this.txtName.Text; string email = this.txtEmail.Text; int level = ((ComboboxItem)this.cbUserLevel.SelectedItem).int_value; string status = ((ComboboxItem)this.cbUserStatus.SelectedItem).string_value; string allowed_web_login = ((ComboboxItem)this.cbWebLogin.SelectedItem).string_value; string training_expert = this.chTrainingExpert.CheckState.ToYesOrNoString(); int max_absent = (int)this.numMaxAbsent.Value; string json_data = "{\"username\":\"" + username.cleanString() + "\","; json_data += "\"name\":\"" + name.cleanString() + "\","; json_data += "\"email\":\"" + email.cleanString() + "\","; json_data += "\"level\":" + level + ","; json_data += "\"status\":\"" + status + "\","; json_data += "\"allowed_web_login\":\"" + allowed_web_login + "\","; json_data += "\"training_expert\":\"" + training_expert + "\","; json_data += "\"max_absent\":" + max_absent.ToString() + ","; json_data += "\"rec_by\":\"" + this.main_form.G.loged_in_user_name + "\"}"; CRUDResult post = ApiActions.POST(PreferenceForm.API_MAIN_URL() + "users/create", json_data); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(post.data); if (sr.result == ServerResult.SERVER_RESULT_SUCCESS) { this.clearForm(); this.loadUserListData(); } else { MessageAlert.Show(sr.message, "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); } } else if(this.txtUserName.Text.Length == 0) { MessageAlert.Show("กรุณาป้อนชื่อผู้ใช้งาน", "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); this.txtUserName.Focus(); } else { MessageAlert.Show("กรุณาป้อนอีเมล์แอดเดรส", "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); this.txtEmail.Focus(); } } private void loadUserListData(int id = 0) { List<Users> users = new List<Users>(); CRUDResult get = ApiActions.GET(PreferenceForm.API_MAIN_URL() + "users/get_all"); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(get.data); switch (sr.result) { case ServerResult.SERVER_RESULT_SUCCESS: this.users = sr.users; // Clear old data this.dgvUsers.Columns.Clear(); this.dgvUsers.Rows.Clear(); // Create column // ID DataGridViewTextBoxColumn text_col1 = new DataGridViewTextBoxColumn(); int c1 = this.dgvUsers.Columns.Add(text_col1); this.dgvUsers.Columns[c1].HeaderText = "ID."; this.dgvUsers.Columns[c1].Width = 40; this.dgvUsers.Columns[c1].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Columns[c1].Visible = false; // username DataGridViewTextBoxColumn text_col2 = new DataGridViewTextBoxColumn(); int c2 = this.dgvUsers.Columns.Add(text_col2); this.dgvUsers.Columns[c2].HeaderText = "รหัสผู้ใช้"; this.dgvUsers.Columns[c2].Width = 110; this.dgvUsers.Columns[c2].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // name DataGridViewTextBoxColumn text_col2_1 = new DataGridViewTextBoxColumn(); text_col2_1.HeaderText = "ชื่อ"; text_col2_1.Width = 110; text_col2_1.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Columns.Add(text_col2_1); // email DataGridViewTextBoxColumn text_col3 = new DataGridViewTextBoxColumn(); int c3 = this.dgvUsers.Columns.Add(text_col3); this.dgvUsers.Columns[c3].HeaderText = "อีเมล์"; //this.dgvUsers.Columns[c3].Width = 160; this.dgvUsers.Columns[c3].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Columns[c3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; // level DataGridViewTextBoxColumn text_col4 = new DataGridViewTextBoxColumn(); int c4 = this.dgvUsers.Columns.Add(text_col4); this.dgvUsers.Columns[c4].HeaderText = "ระดับผู้ใช้"; this.dgvUsers.Columns[c4].Width = 100; this.dgvUsers.Columns[c4].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // status DataGridViewTextBoxColumn text_col5 = new DataGridViewTextBoxColumn(); int c5 = this.dgvUsers.Columns.Add(text_col5); this.dgvUsers.Columns[c5].HeaderText = "สถานะ"; this.dgvUsers.Columns[c5].Width = 50; this.dgvUsers.Columns[c5].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // allowed_web_login DataGridViewTextBoxColumn text_col6 = new DataGridViewTextBoxColumn(); int c6 = this.dgvUsers.Columns.Add(text_col6); this.dgvUsers.Columns[c6].HeaderText = "Web UI"; this.dgvUsers.Columns[c6].Width = 80; this.dgvUsers.Columns[c6].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // is training_expert DataGridViewTextBoxColumn text_col7 = new DataGridViewTextBoxColumn(); int c7 = this.dgvUsers.Columns.Add(text_col7); this.dgvUsers.Columns[c7].HeaderText = "วิทยากร"; this.dgvUsers.Columns[c7].Width = 50; this.dgvUsers.Columns[c7].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // max_absent DataGridViewTextBoxColumn text_col8 = new DataGridViewTextBoxColumn(); text_col8.HeaderText = "วันลา"; text_col8.Width = 50; text_col8.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight; this.dgvUsers.Columns.Add(text_col8); // create_at DataGridViewTextBoxColumn text_col9 = new DataGridViewTextBoxColumn(); int c9 = this.dgvUsers.Columns.Add(text_col9); this.dgvUsers.Columns[c9].HeaderText = "สร้างเมื่อ"; this.dgvUsers.Columns[c9].Width = 140; this.dgvUsers.Columns[c9].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // update_at DataGridViewTextBoxColumn text_col10 = new DataGridViewTextBoxColumn(); int c10 = this.dgvUsers.Columns.Add(text_col10); this.dgvUsers.Columns[c10].HeaderText = "ใช้งานล่าสุด"; this.dgvUsers.Columns[c10].Width = 140; this.dgvUsers.Columns[c10].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // Create data row foreach (Users user in this.users) { int r = this.dgvUsers.Rows.Add(); this.dgvUsers.Rows[r].Tag = (int)user.id; this.dgvUsers.Rows[r].Cells[0].ValueType = typeof(int); this.dgvUsers.Rows[r].Cells[0].Value = user.id; this.dgvUsers.Rows[r].Cells[0].Style.Alignment = DataGridViewContentAlignment.MiddleRight; this.dgvUsers.Rows[r].Cells[1].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[1].Value = user.username; this.dgvUsers.Rows[r].Cells[2].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[2].Value = user.name; this.dgvUsers.Rows[r].Cells[3].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[3].Value = user.email; this.dgvUsers.Rows[r].Cells[4].ValueType = typeof(int); this.dgvUsers.Rows[r].Cells[4].Value = ComboboxItem.GetItemText(this.cbUserLevel, user.level); this.dgvUsers.Rows[r].Cells[4].Style.Alignment = DataGridViewContentAlignment.MiddleLeft; this.dgvUsers.Rows[r].Cells[5].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[5].Value = ComboboxItem.GetItemText(this.cbUserStatus, user.status); this.dgvUsers.Rows[r].Cells[5].Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Rows[r].Cells[6].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[6].Value = ComboboxItem.GetItemText(this.cbWebLogin, user.allowed_web_login); this.dgvUsers.Rows[r].Cells[6].Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Rows[r].Cells[7].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[7].Value = user.training_expert; this.dgvUsers.Rows[r].Cells[7].Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvUsers.Rows[r].Cells[7].Style.ForeColor = (user.training_expert == "Y" ? Color.Black : Color.LightGray); this.dgvUsers.Rows[r].Cells[8].ValueType = typeof(int); this.dgvUsers.Rows[r].Cells[8].Value = user.max_absent; this.dgvUsers.Rows[r].Cells[8].Style.Alignment = DataGridViewContentAlignment.MiddleRight; this.dgvUsers.Rows[r].Cells[9].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[9].Value = user.create_at; this.dgvUsers.Rows[r].Cells[10].ValueType = typeof(string); this.dgvUsers.Rows[r].Cells[10].Value = user.last_use; } // Set selection item if (id > 0) { foreach (DataGridViewRow row in this.dgvUsers.Rows) { if ((int)row.Tag == id) { row.Cells[1].Selected = true; } } } break; default: DialogResult dlg_res = MessageAlert.Show(sr.message, "Error", MessageAlertButtons.RETRY_CANCEL, MessageAlertIcons.ERROR); if (dlg_res == DialogResult.Retry) { this.loadUserListData(); } else { this.Close(); } break; } } private void clearForm() { this.txtUserName.Text = ""; this.txtEmail.Text = ""; this.cbUserLevel.SelectedItem = this.cbUserLevel.Items[2]; this.cbUserStatus.SelectedItem = this.cbUserStatus.Items[0]; this.cbWebLogin.SelectedItem = this.cbWebLogin.Items[0]; } // Data grid view context menu private void dgvUsers_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { int currentMouseOverRow = this.dgvUsers.HitTest(e.X, e.Y).RowIndex; this.dgvUsers.Rows[currentMouseOverRow].Selected = true; ContextMenu m = new ContextMenu(); MenuItem mnu_edit = new MenuItem("แก้ไข"); mnu_edit.Tag = (int)this.dgvUsers.Rows[currentMouseOverRow].Cells[0].Value; mnu_edit.Click += this.editUsers; m.MenuItems.Add(mnu_edit); MenuItem mnu_delete = new MenuItem("ลบ"); mnu_delete.Tag = (int)this.dgvUsers.Rows[currentMouseOverRow].Cells[0].Value; mnu_delete.Click += this.deleteUser; m.MenuItems.Add(mnu_delete); MenuItem mnu_reset_pwd = new MenuItem("รีเซ็ตรหัสผ่านผู้ใช้รายนี้"); mnu_reset_pwd.Tag = (int)this.dgvUsers.Rows[currentMouseOverRow].Tag; mnu_reset_pwd.Click += this.confirmResetPassword; m.MenuItems.Add(mnu_reset_pwd); //// Adding some phrase at the bottom of context menu //if (currentMouseOverRow >= 0) //{ // m.MenuItems.Add(new MenuItem(string.Format("Do something to row {0}", currentMouseOverRow.ToString()))); //} m.Show(this.dgvUsers, new Point(e.X, e.Y)); } } private void dgvUsers_KeyDown(object sender, KeyEventArgs e) { //int id = (int)this.dgvUsers.CurrentRow.Tag; int id = (int)this.dgvUsers.Rows[this.dgvUsers.CurrentCell.RowIndex].Tag; if (e.KeyCode == Keys.E && e.Modifiers == Keys.Alt) { this.showEditForm(id); } else if (e.KeyCode == Keys.D && e.Modifiers == Keys.Alt) { this.confirmDeleteUser(id); } } private void deleteUser(object sender, EventArgs e) { MenuItem mi = sender as MenuItem; int id = (int)mi.Tag; this.confirmDeleteUser(id); } private void dgvUsers_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { int id = (int)this.dgvUsers.Rows[e.RowIndex].Tag; this.showEditForm(id); } } private void editUsers(object sender, EventArgs e) { MenuItem mi = sender as MenuItem; int id = (int)mi.Tag; this.showEditForm(id); } private void showEditForm(int id) { UsersEditForm wind = new UsersEditForm(this.main_form); Console.WriteLine("id : " + id.ToString()); wind.id = id; if (wind.ShowDialog() == DialogResult.OK) { this.loadUserListData(id); } } private void confirmDeleteUser(int id) { if (MessageAlert.Show(StringResource.CONFIRM_DELETE, "", MessageAlertButtons.OK_CANCEL, MessageAlertIcons.QUESTION) == DialogResult.OK) { CRUDResult delete = ApiActions.DELETE(PreferenceForm.API_MAIN_URL() + "users/delete&id=" + id.ToString()); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(delete.data); if (sr.result == ServerResult.SERVER_RESULT_SUCCESS) { this.loadUserListData(); } else { MessageAlert.Show(sr.message, "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); } } } private void confirmResetPassword(object sender, EventArgs e) { MenuItem mi = sender as MenuItem; int id = (int)mi.Tag; if (MessageAlert.Show("ต้องการรีเซ็ตรหัสผ่านผู้ใช้รายนี้ใช่หรือไม่?", "", MessageAlertButtons.YES_NO, MessageAlertIcons.QUESTION) == DialogResult.Yes) { string json_data = "{\"id\":" + id + "}"; CRUDResult post = ApiActions.POST(PreferenceForm.API_MAIN_URL() + "users/reset_password", json_data); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(post.data); if (sr.result == ServerResult.SERVER_RESULT_SUCCESS) { MessageAlert.Show(sr.message, "Process complete", MessageAlertButtons.OK); } else { MessageAlert.Show(sr.message, "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); } } } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Enter) { if (!(this.btnAddUser.Focused || this.btnCancelAddUser.Focused)) { SendKeys.Send("{TAB}"); return true; } } if (keyData == Keys.F6) { if (this.cbUserLevel.Focused || this.cbUserStatus.Focused || this.cbWebLogin.Focused) { SendKeys.Send("{F4}"); return true; } } return base.ProcessCmdKey(ref msg, keyData); } public static List<Users> GetUsers() { CRUDResult get = ApiActions.GET(PreferenceForm.API_MAIN_URL() + "users/get_all"); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(get.data); return sr.users; //if (sr.result == ServerResult.SERVER_RESULT_SUCCESS) //{ // return sr.users; //} //else //{ // return new List<Users>(); //} } } }
44.717791
162
0.536105
[ "MIT" ]
wee2tee/SN_Net_V1.1
SN_Net/Subform/UsersList.cs
22,271
C#
/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the servicecatalog-2015-12-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.ServiceCatalog.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ServiceCatalog.Model.Internal.MarshallTransformations { /// <summary> /// CreateProduct Request Marshaller /// </summary> public class CreateProductRequestMarshaller : IMarshaller<IRequest, CreateProductRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateProductRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateProductRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ServiceCatalog"); string target = "AWS242ServiceCatalogService.CreateProduct"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.HttpMethod = "POST"; string uriResourcePath = "/"; request.ResourcePath = uriResourcePath; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAcceptLanguage()) { context.Writer.WritePropertyName("AcceptLanguage"); context.Writer.Write(publicRequest.AcceptLanguage); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDistributor()) { context.Writer.WritePropertyName("Distributor"); context.Writer.Write(publicRequest.Distributor); } if(publicRequest.IsSetIdempotencyToken()) { context.Writer.WritePropertyName("IdempotencyToken"); context.Writer.Write(publicRequest.IdempotencyToken); } else if(!(publicRequest.IsSetIdempotencyToken())) { context.Writer.WritePropertyName("IdempotencyToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetOwner()) { context.Writer.WritePropertyName("Owner"); context.Writer.Write(publicRequest.Owner); } if(publicRequest.IsSetProductType()) { context.Writer.WritePropertyName("ProductType"); context.Writer.Write(publicRequest.ProductType); } if(publicRequest.IsSetProvisioningArtifactParameters()) { context.Writer.WritePropertyName("ProvisioningArtifactParameters"); context.Writer.WriteObjectStart(); var marshaller = ProvisioningArtifactPropertiesMarshaller.Instance; marshaller.Marshall(publicRequest.ProvisioningArtifactParameters, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSupportDescription()) { context.Writer.WritePropertyName("SupportDescription"); context.Writer.Write(publicRequest.SupportDescription); } if(publicRequest.IsSetSupportEmail()) { context.Writer.WritePropertyName("SupportEmail"); context.Writer.Write(publicRequest.SupportEmail); } if(publicRequest.IsSetSupportUrl()) { context.Writer.WritePropertyName("SupportUrl"); context.Writer.Write(publicRequest.SupportUrl); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateProductRequestMarshaller _instance = new CreateProductRequestMarshaller(); internal static CreateProductRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateProductRequestMarshaller Instance { get { return _instance; } } } }
37.436842
141
0.570645
[ "Apache-2.0" ]
DalavanCloud/aws-sdk-net
sdk/src/Services/ServiceCatalog/Generated/Model/Internal/MarshallTransformations/CreateProductRequestMarshaller.cs
7,113
C#
//extern alias SpeckleNewtonsoft; //using SNJ = SpeckleNewtonsoft.Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CefSharp.WinForms; using CefSharp; using System.IO; using SpeckleCore; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary; using Rhino; using System.Dynamic; using Rhino.DocObjects; using System.Windows; using System.Windows.Forms; using Newtonsoft.Json; using SpecklePopup; namespace SpeckleRhino { // CEF Bound object. // If CEF will be removed, porting to url hacks will be necessary, // so let's keep the methods as simple as possible. public class Interop : IDisposable { public ChromiumWebBrowser Browser; private List<Account> UserAccounts; public List<ISpeckleRhinoClient> UserClients; public Dictionary<string, SpeckleObject> SpeckleObjectCache; public bool SpeckleIsReady = false; public bool SelectionInfoNeedsToBeSentYeMighty = false; // should be false public static JsonSerializerSettings camelCaseSettings = new JsonSerializerSettings() { ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() }; public Interop( ChromiumWebBrowser _originalBrowser ) { SpeckleCore.SpeckleInitializer.Initialize(); SpeckleCore.LocalContext.Init(); Browser = _originalBrowser; UserAccounts = new List<Account>(); UserClients = new List<ISpeckleRhinoClient>(); SpeckleObjectCache = new Dictionary<string, SpeckleObject>(); ReadUserAccounts(); RhinoDoc.NewDocument += RhinoDoc_NewDocument; RhinoDoc.EndOpenDocument += RhinoDoc_EndOpenDocument; RhinoDoc.BeginSaveDocument += RhinoDoc_BeginSaveDocument; RhinoDoc.SelectObjects += RhinoDoc_SelectObjects; RhinoDoc.DeselectObjects += RhinoDoc_DeselectObjects; RhinoDoc.DeselectAllObjects += RhinoDoc_DeselectAllObjects; RhinoApp.Idle += RhinoApp_Idle; } private void RhinoApp_Idle( object sender, EventArgs e ) { //System.Diagnostics.Debug.WriteLine( "I am idle... " + SelectionInfoNeedsToBeSentYeMighty ); if ( SelectionInfoNeedsToBeSentYeMighty ) { NotifySpeckleFrame( "object-selection", "", this.getLayersAndObjectsInfo() ); SelectionInfoNeedsToBeSentYeMighty = false; } } public void SetBrowser( ChromiumWebBrowser _Browser ) { Browser = _Browser; } public void Dispose( ) { this.RemoveAllClients(); RhinoDoc.NewDocument -= RhinoDoc_NewDocument; RhinoDoc.EndOpenDocument -= RhinoDoc_EndOpenDocument; RhinoDoc.BeginSaveDocument -= RhinoDoc_BeginSaveDocument; RhinoDoc.SelectObjects -= RhinoDoc_SelectObjects; RhinoDoc.DeselectObjects -= RhinoDoc_DeselectObjects; RhinoDoc.DeselectAllObjects -= RhinoDoc_DeselectAllObjects; RhinoApp.Idle -= RhinoApp_Idle; } #region Global Events private void RhinoDoc_NewDocument( object sender, DocumentEventArgs e ) { Debug.WriteLine( "New document event" ); NotifySpeckleFrame( "purge-clients", "", "" ); RemoveAllClients(); } private void RhinoDoc_DeselectAllObjects( object sender, RhinoDeselectAllObjectsEventArgs e ) { Debug.WriteLine( "Deselect all event" ); SelectionInfoNeedsToBeSentYeMighty = true; return; } private void RhinoDoc_DeselectObjects( object sender, RhinoObjectSelectionEventArgs e ) { Debug.WriteLine( "Deselect event" ); SelectionInfoNeedsToBeSentYeMighty = true; return; } private void RhinoDoc_SelectObjects( object sender, RhinoObjectSelectionEventArgs e ) { Debug.WriteLine( "Select objs event" ); SelectionInfoNeedsToBeSentYeMighty = true; return; } private void RhinoDoc_EndOpenDocument( object sender, DocumentOpenEventArgs e ) { Debug.WriteLine( "END OPEN DOC" ); // this seems to cover the copy paste issues if ( e.Merge ) return; // purge clients from ui NotifySpeckleFrame( "client-purge", "", "" ); // purge clients from here RemoveAllClients(); // read clients from document strings InstantiateFileClients(); } private void RhinoDoc_BeginSaveDocument( object sender, DocumentSaveEventArgs e ) { Debug.WriteLine( "BEGIN SAVE DOC" ); SaveFileClients(); } #endregion #region General Utils public void ShowDev( ) { Browser.ShowDevTools(); } public string GetDocumentName( ) { return Rhino.RhinoDoc.ActiveDoc.Name; } public string GetDocumentGuid( ) { return Rhino.RhinoDoc.ActiveDoc.DocumentId.ToString(); } public string GetHostApplicationType( ) { return "Rhino"; } #endregion #region Serialisation & Init. /// <summary> /// Do not call this from the constructor as you'll get confilcts with /// browser load, etc. /// </summary> public void AppReady( ) { SpeckleIsReady = true; InstantiateFileClients(); } public void SaveFileClients( ) { RhinoDoc myDoc = RhinoDoc.ActiveDoc; foreach ( ISpeckleRhinoClient rhinoClient in UserClients ) { using ( var ms = new MemoryStream() ) { var formatter = new BinaryFormatter(); formatter.Serialize( ms, rhinoClient ); string section = rhinoClient.GetRole() == ClientRole.Receiver ? "speckle-client-receivers" : "speckle-client-senders"; var client = Convert.ToBase64String( ms.ToArray() ); var clientId = rhinoClient.GetClientId(); RhinoDoc.ActiveDoc.Strings.SetString( section, clientId, client ); } } } public void InstantiateFileClients( ) { if ( !SpeckleIsReady ) return; Debug.WriteLine( "Instantiate file clients." ); string[ ] receiverKeys = RhinoDoc.ActiveDoc.Strings.GetEntryNames( "speckle-client-receivers" ); foreach ( string rec in receiverKeys ) { //if ( UserClients.Any( cl => cl.GetClientId() == rec ) ) // continue; byte[ ] serialisedClient = Convert.FromBase64String( RhinoDoc.ActiveDoc.Strings.GetValue( "speckle-client-receivers", rec ) ); using ( var ms = new MemoryStream() ) { ms.Write( serialisedClient, 0, serialisedClient.Length ); ms.Seek( 0, SeekOrigin.Begin ); RhinoReceiver client = ( RhinoReceiver ) new BinaryFormatter().Deserialize( ms ); client.Context = this; } } string[ ] senderKeys = RhinoDoc.ActiveDoc.Strings.GetEntryNames( "speckle-client-senders" ); foreach ( string sen in senderKeys ) { byte[ ] serialisedClient = Convert.FromBase64String( RhinoDoc.ActiveDoc.Strings.GetValue( "speckle-client-senders", sen ) ); using ( var ms = new MemoryStream() ) { ms.Write( serialisedClient, 0, serialisedClient.Length ); ms.Seek( 0, SeekOrigin.Begin ); RhinoSender client = ( RhinoSender ) new BinaryFormatter().Deserialize( ms ); client.CompleteDeserialisation( this ); } } } #endregion #region Account Management public void ShowAccountPopup( ) { RhinoApp.InvokeOnUiThread( new Action( ( ) => //Window.Dispatcher.Invoke( ( ) => { var signInWindow = new SpecklePopup.SignInWindow( true ); var helper = new System.Windows.Interop.WindowInteropHelper( signInWindow ); helper.Owner = RhinoApp.MainWindowHandle(); signInWindow.ShowDialog(); NotifySpeckleFrame( "refresh-accounts", "", "" ); } ) ); } // called by the web ui public string GetUserAccounts( ) { return JsonConvert.SerializeObject( SpeckleCore.LocalContext.GetAllAccounts(), Interop.camelCaseSettings ); } private void ReadUserAccounts( ) { UserAccounts = SpeckleCore.LocalContext.GetAllAccounts(); } public void AddAccount( string payload ) { var pieces = payload.Split( ',' ); var newAccount = new Account() { RestApi = pieces[ 3 ], Email = pieces[ 0 ], ServerName = pieces[ 2 ], Token = pieces[ 1 ], IsDefault = false }; LocalContext.AddAccount( newAccount ); UserAccounts.Add( newAccount ); } public void RemoveAccount( int payload ) { var toDelete = UserAccounts.FindLast( acc => acc.AccountId == payload ); LocalContext.RemoveAccount( toDelete ); UserAccounts.RemoveAll( account => account.AccountId == toDelete.AccountId ); } #endregion #region Client Management public bool AddReceiverClient( string _payload ) { var myReceiver = new RhinoReceiver( _payload, this ); return true; } public bool AddSenderClientFromSelection( string _payload ) { var mySender = new RhinoSender( _payload, this ); return true; } public bool RemoveClient( string _payload ) { var myClient = UserClients.FirstOrDefault( client => client.GetClientId() == _payload ); if ( myClient == null ) return false; RhinoDoc.ActiveDoc.Strings.Delete( myClient.GetRole() == ClientRole.Receiver ? "speckle-client-receivers" : "speckle-client-senders", myClient.GetClientId() ); myClient.Dispose( true ); return UserClients.Remove( myClient ); } public bool RemoveAllClients( ) { foreach ( var uc in UserClients ) { uc.Dispose(); } UserClients.RemoveAll( c => true ); return true; } public string GetAllClients( ) { foreach ( var client in UserClients ) { if ( client is RhinoSender ) { var rhSender = client as RhinoSender; NotifySpeckleFrame( "client-add", rhSender.StreamId, JsonConvert.SerializeObject( new { stream = rhSender.Client.Stream, client = rhSender.Client }, camelCaseSettings ) ); continue; } var rhReceiver = client as RhinoReceiver; NotifySpeckleFrame( "client-add", rhReceiver.StreamId, JsonConvert.SerializeObject( new { stream = rhReceiver.Client.Stream, client = rhReceiver.Client }, camelCaseSettings ) ); } return JsonConvert.SerializeObject( UserClients, camelCaseSettings ); } #endregion #region To UI (Generic) public void NotifySpeckleFrame( string EventType, string StreamId, string EventInfo ) { if ( !SpeckleIsReady ) { Debug.WriteLine( "Speckle wwas not ready, trying to send " + EventType ); return; } var script = string.Format( "window.EventBus.$emit('{0}', '{1}', '{2}')", EventType, StreamId, EventInfo ); try { Browser.GetMainFrame().EvaluateScriptAsync( script ); } catch { Debug.WriteLine( "For some reason, this browser was not initialised." ); } } #endregion #region From UI (..) public void bakeClient( string clientId ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null || myClient is RhinoReceiver ) ( ( RhinoReceiver ) myClient ).Bake(); } public void bakeLayer( string clientId, string layerGuid ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null || myClient is RhinoReceiver ) ( ( RhinoReceiver ) myClient ).BakeLayer( layerGuid ); } public void setClientPause( string clientId, bool status ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) myClient.TogglePaused( status ); } public void setClientVisibility( string clientId, bool status ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) myClient.ToggleVisibility( status ); } public void setClientHover( string clientId, bool status ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) myClient.ToggleVisibility( status ); } public void setLayerVisibility( string clientId, string layerId, bool status ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) myClient.ToggleLayerVisibility( layerId, status ); } public void setLayerHover( string clientId, string layerId, bool status ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) myClient.ToggleLayerHover( layerId, status ); } public void setObjectHover( string clientId, string layerId, bool status ) { } public void AddRemoveObjects( string clientId, string _guids, bool remove ) { string[ ] guids = JsonConvert.DeserializeObject<string[ ]>( _guids ); var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) try { if ( !remove ) ( ( RhinoSender ) myClient ).AddTrackedObjects( guids ); else ( ( RhinoSender ) myClient ).RemoveTrackedObjects( guids ); } catch { throw new Exception( "Force send client was not a sender. whoopsie poopsiee." ); } } public void refreshClient( string clientId ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) try { ( ( RhinoReceiver ) myClient ).UpdateGlobal(); } catch { throw new Exception( "Refresh client was not a receiver. whoopsie poopsiee." ); } } public void forceSend( string clientId ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null ) try { ( ( RhinoSender ) myClient ).ForceUpdate(); } catch { throw new Exception( "Force send client was not a sender. whoopsie poopsiee." ); } } public void openUrl( string url ) { System.Diagnostics.Process.Start( url ); } public void setName( string clientId, string name ) { var myClient = UserClients.FirstOrDefault( c => c.GetClientId() == clientId ); if ( myClient != null && myClient is RhinoSender ) { ( ( RhinoSender ) myClient ).Client.Stream.Name = name; ( ( RhinoSender ) myClient ).Client.BroadcastMessage( "stream", ( ( RhinoSender ) myClient ).StreamId, new { eventType = "update-name" } ); } } #endregion #region Sender Helpers public string getLayersAndObjectsInfo( bool ignoreSelection = false ) { List<RhinoObject> SelectedObjects; List<LayerSelection> layerInfoList = new List<LayerSelection>(); if ( !ignoreSelection ) { SelectedObjects = RhinoDoc.ActiveDoc.Objects.GetSelectedObjects( false, false ).ToList(); if ( SelectedObjects.Count == 0 || SelectedObjects[ 0 ] == null ) return JsonConvert.SerializeObject( layerInfoList, camelCaseSettings ); } else { SelectedObjects = RhinoDoc.ActiveDoc.Objects.ToList(); if ( SelectedObjects.Count == 0 || SelectedObjects[ 0 ] == null ) return JsonConvert.SerializeObject( layerInfoList, camelCaseSettings ); foreach ( Rhino.DocObjects.Layer ll in RhinoDoc.ActiveDoc.Layers ) { layerInfoList.Add( new LayerSelection() { objectCount = 0, layerName = ll.FullPath, color = System.Drawing.ColorTranslator.ToHtml( ll.Color ), ObjectGuids = new List<string>(), ObjectTypes = new List<string>() } ); } } SelectedObjects = SelectedObjects.OrderBy( o => o.Attributes.LayerIndex ).ToList(); foreach ( var obj in SelectedObjects ) { var layer = RhinoDoc.ActiveDoc.Layers[ obj.Attributes.LayerIndex ]; var myLInfo = layerInfoList.FirstOrDefault( l => l.layerName == layer.FullPath ); if ( myLInfo != null ) { myLInfo.objectCount++; myLInfo.ObjectGuids.Add( obj.Id.ToString() ); myLInfo.ObjectTypes.Add( obj.Geometry.GetType().ToString() ); } else { var myNewLinfo = new LayerSelection() { objectCount = 1, layerName = layer.FullPath, color = System.Drawing.ColorTranslator.ToHtml( layer.Color ), ObjectGuids = new List<string>( new string[ ] { obj.Id.ToString() } ), ObjectTypes = new List<string>( new string[ ] { obj.Geometry.GetType().ToString() } ) }; layerInfoList.Add( myNewLinfo ); } } return Convert.ToBase64String( System.Text.Encoding.UTF8.GetBytes( JsonConvert.SerializeObject( layerInfoList, camelCaseSettings ) ) ); } #endregion } /// <summary> /// Used internally. /// </summary> [Serializable] public class LayerSelection { public string layerName; public int objectCount; public string color; public List<string> ObjectGuids; public List<string> ObjectTypes; } }
31.5
189
0.624301
[ "MIT" ]
BHoM/SpeckleRhino
SpeckleRhinoPlugin/src/Interop.cs
17,894
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNative.Sql { public static class GetElasticPool { /// <summary> /// An elastic pool. /// API Version: 2020-08-01-preview. /// </summary> public static Task<GetElasticPoolResult> InvokeAsync(GetElasticPoolArgs args, InvokeOptions? options = null) => Pulumi.Deployment.Instance.InvokeAsync<GetElasticPoolResult>("azure-native:sql:getElasticPool", args ?? new GetElasticPoolArgs(), options.WithVersion()); } public sealed class GetElasticPoolArgs : Pulumi.InvokeArgs { /// <summary> /// The name of the elastic pool. /// </summary> [Input("elasticPoolName", required: true)] public string ElasticPoolName { get; set; } = null!; /// <summary> /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// </summary> [Input("resourceGroupName", required: true)] public string ResourceGroupName { get; set; } = null!; /// <summary> /// The name of the server. /// </summary> [Input("serverName", required: true)] public string ServerName { get; set; } = null!; public GetElasticPoolArgs() { } } [OutputType] public sealed class GetElasticPoolResult { /// <summary> /// The creation date of the elastic pool (ISO8601 format). /// </summary> public readonly string CreationDate; /// <summary> /// Resource ID. /// </summary> public readonly string Id; /// <summary> /// Kind of elastic pool. This is metadata used for the Azure portal experience. /// </summary> public readonly string Kind; /// <summary> /// The license type to apply for this elastic pool. /// </summary> public readonly string? LicenseType; /// <summary> /// Resource location. /// </summary> public readonly string Location; /// <summary> /// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. /// </summary> public readonly string? MaintenanceConfigurationId; /// <summary> /// The storage limit for the database elastic pool in bytes. /// </summary> public readonly double? MaxSizeBytes; /// <summary> /// Resource name. /// </summary> public readonly string Name; /// <summary> /// The per database settings for the elastic pool. /// </summary> public readonly Outputs.ElasticPoolPerDatabaseSettingsResponse? PerDatabaseSettings; /// <summary> /// The elastic pool SKU. /// /// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: /// /// ```azurecli /// az sql elastic-pool list-editions -l &lt;location&gt; -o table /// ```` /// </summary> public readonly Outputs.SkuResponse? Sku; /// <summary> /// The state of the elastic pool. /// </summary> public readonly string State; /// <summary> /// Resource tags. /// </summary> public readonly ImmutableDictionary<string, string>? Tags; /// <summary> /// Resource type. /// </summary> public readonly string Type; /// <summary> /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. /// </summary> public readonly bool? ZoneRedundant; [OutputConstructor] private GetElasticPoolResult( string creationDate, string id, string kind, string? licenseType, string location, string? maintenanceConfigurationId, double? maxSizeBytes, string name, Outputs.ElasticPoolPerDatabaseSettingsResponse? perDatabaseSettings, Outputs.SkuResponse? sku, string state, ImmutableDictionary<string, string>? tags, string type, bool? zoneRedundant) { CreationDate = creationDate; Id = id; Kind = kind; LicenseType = licenseType; Location = location; MaintenanceConfigurationId = maintenanceConfigurationId; MaxSizeBytes = maxSizeBytes; Name = name; PerDatabaseSettings = perDatabaseSettings; Sku = sku; State = state; Tags = tags; Type = type; ZoneRedundant = zoneRedundant; } } }
33.401235
283
0.588246
[ "Apache-2.0" ]
pulumi-bot/pulumi-azure-native
sdk/dotnet/Sql/GetElasticPool.cs
5,411
C#
using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using System.Threading; namespace CodingToolBox.Command { class TidyControl { public static CancellationTokenSource RunningTidy {get; set;} public static void CancelAndShowHelp(AsyncPackage package) { ThreadHelper.ThrowIfNotOnUIThread(); VsShellUtilities.ShowMessageBox( package, Resources.NeedToConfigure, Resources.Configuration, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); if (RunningTidy != null) { RunningTidy.Dispose(); RunningTidy = null; } var dteService = package.GetService<EnvDTE.DTE, EnvDTE.DTE>(); dteService.ExecuteCommand("Tools.Options", CommandArgs: RunClangTidy.PropertyPageGuidString); } } }
30.575758
105
0.617443
[ "Apache-2.0" ]
codingtoolbox/RunClangTidy
RunClangTidy/Command/TidyControl.cs
1,011
C#
using System.Configuration; namespace MultiFactor.AspNet.Sample.Services { public class MultiFactorSettings { public string ApiUrl { get; set; } public string ApiKey { get; } public string ApiSecret { get; } public MultiFactorSettings() { ApiUrl = ConfigurationManager.AppSettings["mfa-api-url"]; ApiKey = ConfigurationManager.AppSettings["mfa-api-key"]; ApiSecret = ConfigurationManager.AppSettings["mfa-api-secret"]; } } }
29.055556
75
0.634799
[ "MIT" ]
MultifactorLab/MultiFactor.AspNet.Sample
MultiFactor.AspNet.Sample/Services/MultiFactorSettings.cs
525
C#
//------------------------------------------------------------------------------ // <auto-generated /> // This file was automatically generated by the UpdateVendors tool. //------------------------------------------------------------------------------ #region License // Copyright (c) 2007 James Newton-King // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following // conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. #endregion namespace Datadog.Trace.Vendors.Newtonsoft.Json.Serialization { /// <summary> /// A base class for resolving how property names and dictionary keys are serialized. /// </summary> internal abstract class NamingStrategy { /// <summary> /// A flag indicating whether dictionary keys should be processed. /// Defaults to <c>false</c>. /// </summary> public bool ProcessDictionaryKeys { get; set; } /// <summary> /// A flag indicating whether extension data names should be processed. /// Defaults to <c>false</c>. /// </summary> public bool ProcessExtensionDataNames { get; set; } /// <summary> /// A flag indicating whether explicitly specified property names, /// e.g. a property name customized with a <see cref="JsonPropertyAttribute"/>, should be processed. /// Defaults to <c>false</c>. /// </summary> public bool OverrideSpecifiedNames { get; set; } /// <summary> /// Gets the serialized name for a given property name. /// </summary> /// <param name="name">The initial property name.</param> /// <param name="hasSpecifiedName">A flag indicating whether the property has had a name explicitly specified.</param> /// <returns>The serialized property name.</returns> public virtual string GetPropertyName(string name, bool hasSpecifiedName) { if (hasSpecifiedName && !OverrideSpecifiedNames) { return name; } return ResolvePropertyName(name); } /// <summary> /// Gets the serialized name for a given extension data name. /// </summary> /// <param name="name">The initial extension data name.</param> /// <returns>The serialized extension data name.</returns> public virtual string GetExtensionDataName(string name) { if (!ProcessExtensionDataNames) { return name; } return ResolvePropertyName(name); } /// <summary> /// Gets the serialized key for a given dictionary key. /// </summary> /// <param name="key">The initial dictionary key.</param> /// <returns>The serialized dictionary key.</returns> public virtual string GetDictionaryKey(string key) { if (!ProcessDictionaryKeys) { return key; } return ResolvePropertyName(key); } /// <summary> /// Resolves the specified property name. /// </summary> /// <param name="name">The property name to resolve.</param> /// <returns>The resolved property name.</returns> protected abstract string ResolvePropertyName(string name); } }
39.293578
126
0.611254
[ "Apache-2.0" ]
ConnectionMaster/dd-trace-dotnet
src/Datadog.Trace/Vendors/Newtonsoft.Json/Serialization/NamingStrategy.cs
4,283
C#
using System; using System.Windows.Input; using Xceed.Wpf.Toolkit; namespace SqlPad { public class SearchTextBox : WatermarkTextBox { private static readonly RoutedCommand ClearPhraseCommand = new RoutedCommand("ClearPhrase", typeof(SearchTextBox), new InputGestureCollection { new KeyGesture(Key.Escape) }); public SearchTextBox() { SqlPadTextBox.ConfigureCommands(this); CommandBindings.Add(new CommandBinding(ClearPhraseCommand, (s, args) => Text = String.Empty)); } } }
27.444444
176
0.769231
[ "MIT" ]
Husqvik/SQLPad
SqlPad/SearchTextBox.cs
496
C#
namespace SqlStreamStore { using System; using System.Linq; using System.Net.Http; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using SqlStreamStore.HAL; using SqlStreamStore.Infrastructure; public class HttpClientStreamStoreFixture : IStreamStoreFixture { private readonly InMemoryStreamStore _inMemoryStreamStore; private readonly TestServer _server; public HttpClientStreamStoreFixture() { _inMemoryStreamStore = new InMemoryStreamStore(() => GetUtcNow()); var random = new Random(); var segments = Enumerable.Range(0, random.Next(1, 3)).Select(_ => Guid.NewGuid()).ToArray(); var basePath = $"/{string.Join("/", segments)}"; var webHostBuilder = new WebHostBuilder() .ConfigureServices(services => services.AddSqlStreamStoreHal()) .Configure(builder => builder.Map(basePath, inner => inner.UseSqlStreamStoreHal(_inMemoryStreamStore))); _server = new TestServer(webHostBuilder); var handler = new RedirectingHandler { InnerHandler = _server.CreateHandler() }; Store = new HttpClientSqlStreamStore( new HttpClientSqlStreamStoreSettings { GetUtcNow = () => GetUtcNow(), BaseAddress = new UriBuilder { Path = basePath.Length == 1 ? basePath : $"{basePath}/" }.Uri, CreateHttpClient = () => new HttpClient(handler, false) }); } public void Dispose() { Store.Dispose(); _server.Dispose(); _inMemoryStreamStore.Dispose(); } public IStreamStore Store { get; } public GetUtcNow GetUtcNow { get; set; } = SystemClock.GetUtcNow; public long MinPosition { get; set; } = 0; public int MaxSubscriptionCount { get; set; } = 500; public bool DisableDeletionTracking { get => throw new NotSupportedException(); set => throw new NotSupportedException(); } } }
32.671429
120
0.577613
[ "MIT" ]
ArneSchoonvliet/SQLStreamStore
tests/SqlStreamStore.Http.Tests/HttpClientStreamStoreFixture.cs
2,287
C#
namespace E3DC.RSCP.Lib.Tags { [TagGroup(0x18)] public enum MYPV : uint { RSP_FIND_DEVICES = 0x000003, RSP_REMOVE_DEVICES = 0x000006, RSP_INSTANT_BOOST = 0x000007, DEVICE = 0x000100, DEVICE_SERIAL = 0x000101, DEVICE_ENABLED = 0x000102, DEVICE_IP = 0x000103, DEVICE_TEMPERATURE_CURRENT = 0x000104, DEVICE_TEMPERATURE_MAXIMUM = 0x000105, DEVICE_POWER = 0x000106, DEVICE_STATUS = 0x000107, DEVICE_CONTROL_MODE = 0x000108, DEVICE_TYPE = 0x000109, DEVICE_TIMESPAN_IBOOST = 0x000110, DEVICE_BOOST_LIST = 0x000200, DEVICE_BOOST_ITEM = 0x000300, DEVICE_BOOST_START = 0x000301, DEVICE_BOOST_STOP = 0x000302, DEVICE_BOOST_TEMPERATURE = 0x000303, DEVICE_BOOST_ACTIVE = 0x000304, DEVICE_BOOST_WEEKDAYS = 0x000305, DEVICE_BOOST_NAME = 0x000306, RSP_LIST_DEVICES = 0x200004, RSP_WRITE_DEVICES = 0x300004, GENERAL_ERROR = 0x7fffff, } }
32.40625
46
0.648023
[ "Apache-2.0" ]
mr-sven/E3DC.RSCP
E3DC.RSCP.Lib/Tags/MYPV.cs
1,039
C#
namespace DomainDrivenDesign; public static class OrderItemFactory { public static OrderItem Create(Product product, decimal quantity) { return new OrderItem(product, new Quantity(quantity)); } }
21.7
69
0.737327
[ "MIT" ]
rafaelfgx/DomainDrivenDesign
source/DomainDrivenDesign/Order/OrderItemFactory.cs
217
C#
using System; using System.CodeDom.Compiler; using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Xml.Serialization; namespace Workday.BenefitsAdministration { [GeneratedCode("System.Xml", "4.6.1590.0"), DesignerCategory("code"), DebuggerStepThrough, XmlType(Namespace = "urn:com.workday/bsvc")] [Serializable] public class Person_Name_DataType : INotifyPropertyChanged { private Legal_Name_DataType legal_Name_DataField; private Preferred_Name_DataType preferred_Name_DataField; private Additional_Name_DataType[] additional_Name_DataField; [method: CompilerGenerated] [CompilerGenerated] public event PropertyChangedEventHandler PropertyChanged; [XmlElement(Order = 0)] public Legal_Name_DataType Legal_Name_Data { get { return this.legal_Name_DataField; } set { this.legal_Name_DataField = value; this.RaisePropertyChanged("Legal_Name_Data"); } } [XmlElement(Order = 1)] public Preferred_Name_DataType Preferred_Name_Data { get { return this.preferred_Name_DataField; } set { this.preferred_Name_DataField = value; this.RaisePropertyChanged("Preferred_Name_Data"); } } [XmlElement("Additional_Name_Data", Order = 2)] public Additional_Name_DataType[] Additional_Name_Data { get { return this.additional_Name_DataField; } set { this.additional_Name_DataField = value; this.RaisePropertyChanged("Additional_Name_Data"); } } protected void RaisePropertyChanged(string propertyName) { PropertyChangedEventHandler propertyChanged = this.PropertyChanged; if (propertyChanged != null) { propertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } }
23.328947
136
0.752397
[ "MIT" ]
matteofabbri/Workday.WebServices
Workday.BenefitsAdministration/Person_Name_DataType.cs
1,773
C#
#region License /* * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion using System; using Spring.Core.TypeResolution; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; using Spring.Util; using TIBCO.EMS; using Common.Logging; namespace Spring.Messaging.Ems.Jndi { public class JndiLookupFactoryObject : JndiObjectLocator, IConfigurableFactoryObject { static JndiLookupFactoryObject() { TypeRegistry.RegisterType("LookupContext", typeof(LookupContext)); TypeRegistry.RegisterType("JndiContextType", typeof(JndiContextType)); } private object defaultObject; private Object jndiObject; private IObjectDefinition productTemplate; public JndiLookupFactoryObject() { this.logger = LogManager.GetLogger(GetType()); } /// <summary> /// Sets the default object to fall back to if the JNDI lookup fails. /// Default is none. /// </summary> /// <remarks> /// <para>This can be an arbitrary bean reference or literal value. /// It is typically used for literal values in scenarios where the JNDI environment /// might define specific config settings but those are not required to be present. /// </para> /// </remarks> /// <value>The default object to use when lookup fails.</value> public object DefaultObject { set { defaultObject = value; } } #region Implementation of IFactoryObject /// <summary> /// Return the Jndi object /// </summary> /// <returns>The Jndi object</returns> public object GetObject() { return this.jndiObject; } /// <summary> /// Return type of object retrieved from Jndi or the expected type if the Jndi retrieval /// did not succeed. /// </summary> /// <value>Return value of retrieved object</value> public Type ObjectType { get { if (this.jndiObject != null) { return this.jndiObject.GetType(); } return ExpectedType; } } /// <summary> /// Returns true /// </summary> public bool IsSingleton { get { return true; } } #endregion public override void AfterPropertiesSet() { base.AfterPropertiesSet(); TypeRegistry.RegisterType("LookupContext", typeof(LookupContext)); if (this.defaultObject != null && ExpectedType != null && !ObjectUtils.IsAssignable(ExpectedType, this.defaultObject)) { throw new ArgumentException("Default object [" + this.defaultObject + "] of type [" + this.defaultObject.GetType().Name + "] is not of expected type [" + ExpectedType.Name + "]"); } // Locate specified JNDI object. this.jndiObject = LookupWithFallback(); } protected virtual object LookupWithFallback() { try { return Lookup(); } catch (TypeMismatchNamingException) { // Always let TypeMismatchNamingException through - // we don't want to fall back to the defaultObject in this case. throw; } catch (NamingException ex) { if (this.defaultObject != null) { if (logger.IsDebugEnabled) { logger.Debug("JNDI lookup failed - returning specified default object instead", ex); } else if (logger.IsInfoEnabled) { logger.Info("JNDI lookup failed - returning specified default object instead: " + ex); } return this.defaultObject; } throw; } } /// <summary> /// Gets the template object definition that should be used /// to configure the instance of the object managed by this factory. /// </summary> /// <value></value> public IObjectDefinition ProductTemplate { get { return productTemplate; } set { productTemplate = value; } } } }
32.4
110
0.55189
[ "Apache-2.0" ]
MaferYangPointJun/Spring.net
src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs
5,184
C#
/** * Copyright 2015 Canada Health Infoway, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Author: $LastChangedBy: tmcgrady $ * Last modified: $LastChangedDate: 2011-05-04 15:47:15 -0400 (Wed, 04 May 2011) $ * Revision: $LastChangedRevision: 2623 $ */ /* This class was auto-generated by the message builder generator tools. */ using Ca.Infoway.Messagebuilder; namespace Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_imm.Domainvalue { public interface PeriarticularRoute : Code { } }
37.75
83
0.712394
[ "ECL-2.0", "Apache-2.0" ]
CanadaHealthInfoway/message-builder-dotnet
message-builder-release-ab-r02_04_03_imm/Main/Ca/Infoway/Messagebuilder/Model/Ab_r02_04_03_imm/Domainvalue/PeriarticularRoute.cs
1,057
C#
using Hi3Helper.Data; using Hi3Helper.Preset; using Hi3Helper.Shared.ClassStruct; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using static Hi3Helper.Data.ConverterTool; using static Hi3Helper.Locale; using static Hi3Helper.Logger; using static Hi3Helper.Shared.Region.InstallationManagement; using static Hi3Helper.Shared.Region.LauncherConfig; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. namespace CollapseLauncher.Dialogs { public partial class InstallationConvert : Page { string SourceDataIntegrityURL; string TargetDataIntegrityURL; string GameVersion; PresetConfigClasses SourceProfile; PresetConfigClasses TargetProfile; GameConversionManagement Converter; IniFile SourceIniFile; CancellationTokenSource tokenSource = new CancellationTokenSource(); List<FilePropertiesRemote> BrokenFileIndexesProperty = new List<FilePropertiesRemote>(); Dictionary<string, PresetConfigClasses> ConvertibleRegions; public InstallationConvert() { try { this.InitializeComponent(); } catch (Exception ex) { LogWriteLine($"{ex}", Hi3Helper.LogType.Error, true); ErrorSender.SendException(ex); } } public async void StartConversionProcess() { try { string EndpointURL = string.Format(CurrentRegion.ZipFileURL, Path.GetFileNameWithoutExtension(regionResourceProp.data.game.latest.path)); bool IsAskContinue = true; while (IsAskContinue) { (SourceProfile, TargetProfile) = await AskConvertionDestination(); if (IsSourceGameExist(SourceProfile)) IsAskContinue = false; else { await new ContentDialog { Title = Lang._InstallConvert.SelectDialogTitle, Content = Lang._InstallConvert.SelectDialogSubtitleNotInstalled, CloseButtonText = null, PrimaryButtonText = Lang._Misc.Okay, SecondaryButtonText = null, DefaultButton = ContentDialogButton.Primary, Background = (Brush)Application.Current.Resources["DialogAcrylicBrush"], XamlRoot = Content.XamlRoot }.ShowAsync(); } } await DoSetProfileDataLocation(); await DoDownloadRecipe(); await DoPrepareIngredients(); await DoConversion(); await DoVerification(); ApplyConfiguration(); await new ContentDialog { Title = Lang._InstallConvert.ConvertSuccessTitle, Content = new TextBlock { Text = string.Format(Lang._InstallConvert.ConvertSuccessSubtitle, SourceProfile.ZoneName, TargetProfile.ZoneName), TextWrapping = TextWrapping.Wrap }, CloseButtonText = null, PrimaryButtonText = Lang._Misc.OkayBackToMenu, SecondaryButtonText = null, DefaultButton = ContentDialogButton.Primary, Background = (Brush)Application.Current.Resources["DialogAcrylicBrush"], XamlRoot = Content.XamlRoot }.ShowAsync(); OperationCancelled(); } catch (OperationCanceledException) { LogWriteLine($"Conversion process is cancelled for Game Region: {CurrentRegion.ZoneName}"); OperationCancelled(); } catch (Exception ex) { LogWriteLine($"{ex}", Hi3Helper.LogType.Error, true); ErrorSender.SendException(ex); MainFrameChanger.ChangeWindowFrame(typeof(Pages.UnhandledExceptionPage)); } } private async Task DoSetProfileDataLocation() { SourceProfile.ActualGameDataLocation = NormalizePath(SourceIniFile["launcher"]["game_install_path"].ToString()); TargetProfile.ActualGameDataLocation = Path.Combine(Path.GetDirectoryName(SourceProfile.ActualGameDataLocation), $"{TargetProfile.GameDirectoryName}_ConvertedTo-{TargetProfile.ProfileName}"); string TargetINIPath = Path.Combine(AppGameFolder, TargetProfile.ProfileName, "config.ini"); SourceDataIntegrityURL = await FetchDataIntegrityURL(SourceProfile); TargetDataIntegrityURL = await FetchDataIntegrityURL(TargetProfile); DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 0; Step1.Opacity = 1f; Step1ProgressRing.IsIndeterminate = false; Step1ProgressRing.Value = 100; Step1ProgressStatus.Text = Lang._Misc.Completed; }); } private async Task<string> FetchDataIntegrityURL(PresetConfigClasses Profile) { RegionResourceProp _Entry; using (MemoryStream s = new MemoryStream()) { await new HttpClientHelper().DownloadFileAsync(Profile.LauncherResourceURL, s, tokenSource.Token, null, null, false); _Entry = JsonConvert.DeserializeObject<RegionResourceProp>(Encoding.UTF8.GetString(s.ToArray())); } GameVersion = _Entry.data.game.latest.version; return string.Format(Profile.ZipFileURL, Path.GetFileNameWithoutExtension(_Entry.data.game.latest.path)); } public bool IsSourceGameExist(PresetConfigClasses Profile) { string INIPath = Path.Combine(AppGameFolder, Profile.ProfileName, "config.ini"); string GamePath; string ExecPath; if (!File.Exists(INIPath)) return false; SourceIniFile = new IniFile(); SourceIniFile.Load(new FileStream(INIPath, FileMode.Open, FileAccess.Read)); try { GamePath = NormalizePath(SourceIniFile["launcher"]["game_install_path"].ToString()); if (!Directory.Exists(GamePath)) return false; ExecPath = Path.Combine(GamePath, Profile.GameExecutableName); if (!File.Exists(ExecPath)) return false; } catch { return false; } return true; } public async Task<(PresetConfigClasses, PresetConfigClasses)> AskConvertionDestination() { ConvertibleRegions = new Dictionary<string, PresetConfigClasses>(); foreach (PresetConfigClasses Config in ConfigStore.Config.Where(x => x.IsConvertible ?? false)) ConvertibleRegions.Add(Config.ZoneName, Config); ComboBox SourceGame = new ComboBox(); ComboBox TargetGame = new ComboBox(); ContentDialog Dialog = new ContentDialog(); SelectionChangedEventHandler SourceGameChangedArgs = new SelectionChangedEventHandler((object sender, SelectionChangedEventArgs e) => { TargetGame.IsEnabled = true; Dialog.IsSecondaryButtonEnabled = false; TargetGame.ItemsSource = GetConvertibleNameList((sender as ComboBox).SelectedItem.ToString()); }); SelectionChangedEventHandler TargetGameChangedArgs = new SelectionChangedEventHandler((object sender, SelectionChangedEventArgs e) => { if ((sender as ComboBox).SelectedIndex != -1) Dialog.IsSecondaryButtonEnabled = true; }); SourceGame = new ComboBox { Width = 200, ItemsSource = new List<string>(ConvertibleRegions.Keys), PlaceholderText = Lang._InstallConvert.SelectDialogSource }; SourceGame.SelectionChanged += SourceGameChangedArgs; TargetGame = new ComboBox { Width = 200, PlaceholderText = Lang._InstallConvert.SelectDialogTarget, IsEnabled = false }; TargetGame.SelectionChanged += TargetGameChangedArgs; StackPanel DialogContainer = new StackPanel() { Orientation = Orientation.Vertical }; StackPanel ComboBoxContainer = new StackPanel() { Orientation = Orientation.Horizontal }; ComboBoxContainer.Children.Add(SourceGame); ComboBoxContainer.Children.Add(new SymbolIcon() { Symbol = Symbol.Switch, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(16, 0, 16, 0), Opacity = 0.5f }); ComboBoxContainer.Children.Add(TargetGame); DialogContainer.Children.Add(new TextBlock { Text = Lang._InstallConvert.SelectDialogSubtitle, Margin = new Thickness(0, 0, 0, 16), TextWrapping = TextWrapping.Wrap, }); DialogContainer.Children.Add(ComboBoxContainer); Dialog = new ContentDialog { Title = Lang._InstallConvert.SelectDialogTitle, Content = DialogContainer, CloseButtonText = null, PrimaryButtonText = Lang._Misc.Cancel, SecondaryButtonText = Lang._Misc.Next, IsSecondaryButtonEnabled = false, DefaultButton = ContentDialogButton.Secondary, Background = (Brush)Application.Current.Resources["DialogAcrylicBrush"], XamlRoot = Content.XamlRoot }; PresetConfigClasses SourceRet = null; PresetConfigClasses TargetRet = null; switch (await Dialog.ShowAsync()) { case ContentDialogResult.Secondary: SourceRet = ConfigStore.Config.Where(x => x.ZoneName == SourceGame.SelectedItem.ToString()).First(); TargetRet = ConfigStore.Config.Where(x => x.ZoneName == TargetGame.SelectedItem.ToString()).First(); break; case ContentDialogResult.Primary: throw new OperationCanceledException(); } return (SourceRet, TargetRet); } private List<string> GetConvertibleNameList(string ZoneName) { List<string> _out = new List<string>(); List<string> GameTargetProfileName = ConfigStore.Config .Where(x => x.ZoneName == ZoneName) .Select(x => x.ConvertibleTo) .First(); foreach (string Entry in GameTargetProfileName) _out.Add(ConfigStore.Config .Where(x => x.ProfileName == Entry) .Select(x => x.ZoneName) .First()); return _out; } private async Task DoDownloadRecipe() { DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 1; Step2.Opacity = 1f; Step2ProgressRing.IsIndeterminate = false; Step2ProgressRing.Value = 0; Step2ProgressStatus.Text = Lang._InstallConvert.Step2Subtitle; }); Converter = new GameConversionManagement(SourceProfile, TargetProfile, SourceDataIntegrityURL, TargetDataIntegrityURL, GameVersion, Content); Converter.ProgressChanged += Step2ProgressEvents; await Converter.StartDownloadRecipe(); Converter.ProgressChanged -= Step2ProgressEvents; DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 1; Step2.Opacity = 1f; Step2ProgressRing.IsIndeterminate = false; Step2ProgressRing.Value = 100; Step2ProgressStatus.Text = Lang._Misc.Completed; }); } private void Step2ProgressEvents(object sender, GameConversionManagement.ConvertProgress e) { DispatcherQueue.TryEnqueue(() => { Step2ProgressRing.Value = e.Percentage; Step2ProgressTitle.Text = e.ProgressStatus; Step2ProgressStatus.Text = e.ProgressDetail; }); } private async Task DoPrepareIngredients() { DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 2; Step3.Opacity = 1f; Step3ProgressRing.IsIndeterminate = false; Step3ProgressRing.Value = 0; Step3ProgressStatus.Text = Lang._InstallConvert.Step3Subtitle; }); Converter.ProgressChanged += Step3ProgressEvents; await Converter.StartPreparation(); Converter.ProgressChanged -= Step3ProgressEvents; DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 2; Step3.Opacity = 1f; Step3ProgressRing.IsIndeterminate = false; Step3ProgressRing.Value = 100; Step3ProgressStatus.Text = Lang._Misc.Completed; }); } private void Step3ProgressEvents(object sender, GameConversionManagement.ConvertProgress e) { DispatcherQueue.TryEnqueue(() => { Step3ProgressRing.Value = e.Percentage; Step3ProgressTitle.Text = e.ProgressStatus; Step3ProgressStatus.Text = e.ProgressDetail; }); } private async Task DoConversion() { DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 3; Step4.Opacity = 1f; Step4ProgressRing.IsIndeterminate = false; Step4ProgressRing.Value = 0; Step4ProgressStatus.Text = Lang._InstallConvert.Step4Subtitle; }); Converter.ProgressChanged += Step4ProgressEvents; await Converter.StartConversion(); Converter.ProgressChanged -= Step4ProgressEvents; DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 3; Step4.Opacity = 1f; Step4ProgressRing.IsIndeterminate = false; Step4ProgressRing.Value = 100; Step4ProgressStatus.Text = Lang._Misc.Completed; }); } private void Step4ProgressEvents(object sender, GameConversionManagement.ConvertProgress e) { DispatcherQueue.TryEnqueue(() => { Step4ProgressRing.Value = e.Percentage; Step4ProgressStatus.Text = e.ProgressDetail; }); } private async Task DoVerification() { DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 4; Step5.Opacity = 1f; Step5ProgressRing.IsIndeterminate = false; Step5ProgressRing.Value = 0; Step5ProgressStatus.Text = Lang._InstallConvert.Step5Subtitle; }); Converter.ProgressChanged += Step5ProgressEvents; await Converter.PostConversionVerify(); Converter.ProgressChanged -= Step5ProgressEvents; DispatcherQueue.TryEnqueue(() => { ProgressSlider.Value = 4; Step5.Opacity = 1f; Step5ProgressRing.IsIndeterminate = false; Step5ProgressRing.Value = 100; Step5ProgressStatus.Text = "Completed!"; }); } private void Step5ProgressEvents(object sender, GameConversionManagement.ConvertProgress e) { DispatcherQueue.TryEnqueue(() => { Step5ProgressRing.Value = e.Percentage; Step5ProgressStatus.Text = e.ProgressDetail; }); } public void ApplyConfiguration() { CurrentRegion = TargetProfile; CurrentRegion.GameDirectoryName = Path.GetFileNameWithoutExtension(TargetProfile.ActualGameDataLocation); gamePath = Path.GetDirectoryName(TargetProfile.ActualGameDataLocation); string IniPath = Path.Combine(AppGameFolder, TargetProfile.ProfileName); gameIni.ProfilePath = Path.Combine(IniPath, "config.ini"); gameIni.Profile = new IniFile(); gameIni.ProfileStream = new FileStream(gameIni.ProfilePath, FileMode.Create, FileAccess.ReadWrite); BuildGameIniProfile(); SetAndSaveConfigValue("CurrentRegion", ConfigStore.Config.FindIndex(x => x.ProfileName == TargetProfile.ProfileName)); LoadAppConfig(); } private void OperationCancelled() { MigrationWatcher.IsMigrationRunning = false; MainFrameChanger.ChangeWindowFrame(typeof(MainPage)); } private void Page_Loaded(object sender, RoutedEventArgs e) { MigrationWatcher.IsMigrationRunning = true; StartConversionProcess(); } } }
39.975446
203
0.582556
[ "MIT" ]
neon-nyan/CollapseLauncher
CollapseLauncher/XAMLs/MainApp/Pages/Dialogs/InstallationConvert.xaml.cs
17,911
C#
using ReactiveUI; using System.Windows.Input; namespace RVisUI.Mvvm { public class SimulationLabelViewModel : ReactiveObject, ISimulationLabelViewModel { public SimulationLabelViewModel() { OK = ReactiveCommand.Create( () => DialogResult = true, this.ObservableForProperty(vm => vm.Name, _ => Name?.Length > 0) ); Cancel = ReactiveCommand.Create(() => DialogResult = false); } public string? Name { get => _targetSymbol; set => this.RaiseAndSetIfChanged(ref _targetSymbol, value); } private string? _targetSymbol; public string? Description { get => _description; set => this.RaiseAndSetIfChanged(ref _description, value); } private string? _description; public ICommand OK { get; } public ICommand Cancel { get; } public bool? DialogResult { get => _dialogResult; set => this.RaiseAndSetIfChanged(ref _dialogResult, value); } private bool? _dialogResult; } }
23.511628
83
0.649852
[ "MIT" ]
GMPtk/RVis
UI/RVisUI.Mvvm/Dialog/SimulationLabelViewModel.cs
1,013
C#
using System; using System.Linq; using System.Collections.Concurrent; using System.Collections.Generic; using com.csutil.eventbus; namespace com.csutil { public class EventBus : IEventBus { static EventBus() { // Log.d("EventBus used the first time.."); } public static IEventBus instance = new EventBus(); public ConcurrentQueue<string> eventHistory { get; set; } /// <summary> If true all erros during publish are not only logged but rethrown. Will be true in DEBUG mode </summary> public bool throwPublishErrors = false; /// <summary> sync subscribing and publishing to not happen at the same time </summary> private object threadLock = new object(); private readonly ConcurrentDictionary<string, List<KeyValuePair<object, Delegate>>> map = new ConcurrentDictionary<string, List<KeyValuePair<object, Delegate>>>(); public EventBus() { eventHistory = new ConcurrentQueue<string>(); #if DEBUG // In debug mode throw all publish errors: throwPublishErrors = true; #endif } public void Subscribe(object subscriber, string eventName, Delegate callback) { lock (threadLock) { var replacedDelegate = AddOrReplace(GetOrAdd(eventName), subscriber, callback); if (replacedDelegate != null) { Log.w("Existing subscriber was replaced for event=" + eventName); } } } private Delegate AddOrReplace(List<KeyValuePair<object, Delegate>> self, object subscriber, Delegate callback) { var i = self.FindIndex(x => x.Key == subscriber); var newEntry = new KeyValuePair<object, Delegate>(subscriber, callback); if (i >= 0) { var oldEntry = self[i]; self[i] = newEntry; return oldEntry.Value; } else { self.Add(newEntry); return null; } } private List<KeyValuePair<object, Delegate>> GetOrAdd(string eventName) { return map.GetOrAdd(eventName, (_) => { return new List<KeyValuePair<object, Delegate>>(); }); } public IEnumerable<object> GetSubscribersFor(string eventName) { var subscribers = map.GetValue(eventName, null); if (subscribers != null) { var m = subscribers.Map(x => x.Key); return m; } return new List<object>(); } public List<object> Publish(string eventName, params object[] args) { return NewPublishIEnumerable(eventName, args).ToList(); } public IEnumerable<object> NewPublishIEnumerable(string eventName, params object[] args) { lock (threadLock) { eventHistory.Enqueue(eventName); List<KeyValuePair<object, Delegate>> dictForEventName; map.TryGetValue(eventName, out dictForEventName); if (!dictForEventName.IsNullOrEmpty()) { var subscriberDelegates = dictForEventName.Map(x => x.Value).ToList(); return subscriberDelegates.Map(subscriberDelegate => { try { object result; if (subscriberDelegate.DynamicInvokeV2(args, out result, throwPublishErrors)) { return result; } } catch (Exception e) { if (throwPublishErrors) { throw; } else { Log.e(e); } } return null; }); } return new List<object>(); } } public bool Unsubscribe(object subscriber, string eventName) { if (!map.ContainsKey(eventName)) { return false; } KeyValuePair<object, Delegate> elemToRemove = map[eventName].FirstOrDefault(x => x.Key == subscriber); if (map[eventName].Remove(elemToRemove)) { if (map[eventName].IsNullOrEmpty()) return TryRemove(map, eventName); return true; } Log.w("Could not unsubscribe subscriber=" + subscriber + " from event '" + eventName + "'"); return false; } public bool UnsubscribeAll(object subscriber) { var registeredEvents = map.Filter(x => x.Value.Exists(y => y.Key == subscriber)); var removedCallbacks = new List<Delegate>(); foreach (var eventMaps in registeredEvents) { var eventName = eventMaps.Key; var subscribersForEventName = eventMaps.Value; var entryToRemove = subscribersForEventName.First(x => x.Key == subscriber); if (subscribersForEventName.Remove(entryToRemove)) { removedCallbacks.Add(entryToRemove.Value); } if (subscribersForEventName.IsNullOrEmpty()) { TryRemove(map, eventName); } } return removedCallbacks.Count > 0; } private static bool TryRemove<K, V>(ConcurrentDictionary<K, V> self, K key) { V _; return self.TryRemove(key, out _); } } }
42.081301
126
0.580371
[ "Apache-2.0" ]
dignati/cscore
CsCore/PlainNetClassLib/src/Plugins/CsCore/com/csutil/eventbus/EventBus.cs
5,176
C#
/* * DocuSign REST API * * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. * * OpenAPI spec version: v2 * Contact: devcenter@docusign.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using NUnit.Framework; using System; using System.Linq; using System.IO; using System.Collections.Generic; using DocuSign.eSign.Api; using DocuSign.eSign.Model; using DocuSign.eSign.Client; using System.Reflection; namespace DocuSign.eSign.Test { /// <summary> /// Class for testing AccountBillingPlan /// </summary> /// <remarks> /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the model. /// </remarks> [TestFixture] public class AccountBillingPlanTests { // TODO uncomment below to declare an instance variable for AccountBillingPlan //private AccountBillingPlan instance; /// <summary> /// Setup before each test /// </summary> [SetUp] public void Init() { // TODO uncomment below to create an instance of AccountBillingPlan //instance = new AccountBillingPlan(); } /// <summary> /// Clean up after each test /// </summary> [TearDown] public void Cleanup() { } /// <summary> /// Test an instance of AccountBillingPlan /// </summary> [Test] public void AccountBillingPlanInstanceTest() { // TODO uncomment below to test "IsInstanceOfType" AccountBillingPlan //Assert.IsInstanceOfType<AccountBillingPlan> (instance, "variable 'instance' is a AccountBillingPlan"); } /// <summary> /// Test the property 'AddOns' /// </summary> [Test] public void AddOnsTest() { // TODO unit test for the property 'AddOns' } /// <summary> /// Test the property 'CanCancelRenewal' /// </summary> [Test] public void CanCancelRenewalTest() { // TODO unit test for the property 'CanCancelRenewal' } /// <summary> /// Test the property 'CanUpgrade' /// </summary> [Test] public void CanUpgradeTest() { // TODO unit test for the property 'CanUpgrade' } /// <summary> /// Test the property 'CurrencyCode' /// </summary> [Test] public void CurrencyCodeTest() { // TODO unit test for the property 'CurrencyCode' } /// <summary> /// Test the property 'EnableSupport' /// </summary> [Test] public void EnableSupportTest() { // TODO unit test for the property 'EnableSupport' } /// <summary> /// Test the property 'IncludedSeats' /// </summary> [Test] public void IncludedSeatsTest() { // TODO unit test for the property 'IncludedSeats' } /// <summary> /// Test the property 'IncrementalSeats' /// </summary> [Test] public void IncrementalSeatsTest() { // TODO unit test for the property 'IncrementalSeats' } /// <summary> /// Test the property 'IsDowngrade' /// </summary> [Test] public void IsDowngradeTest() { // TODO unit test for the property 'IsDowngrade' } /// <summary> /// Test the property 'OtherDiscountPercent' /// </summary> [Test] public void OtherDiscountPercentTest() { // TODO unit test for the property 'OtherDiscountPercent' } /// <summary> /// Test the property 'PaymentCycle' /// </summary> [Test] public void PaymentCycleTest() { // TODO unit test for the property 'PaymentCycle' } /// <summary> /// Test the property 'PaymentMethod' /// </summary> [Test] public void PaymentMethodTest() { // TODO unit test for the property 'PaymentMethod' } /// <summary> /// Test the property 'PerSeatPrice' /// </summary> [Test] public void PerSeatPriceTest() { // TODO unit test for the property 'PerSeatPrice' } /// <summary> /// Test the property 'PlanClassification' /// </summary> [Test] public void PlanClassificationTest() { // TODO unit test for the property 'PlanClassification' } /// <summary> /// Test the property 'PlanFeatureSets' /// </summary> [Test] public void PlanFeatureSetsTest() { // TODO unit test for the property 'PlanFeatureSets' } /// <summary> /// Test the property 'PlanId' /// </summary> [Test] public void PlanIdTest() { // TODO unit test for the property 'PlanId' } /// <summary> /// Test the property 'PlanName' /// </summary> [Test] public void PlanNameTest() { // TODO unit test for the property 'PlanName' } /// <summary> /// Test the property 'RenewalStatus' /// </summary> [Test] public void RenewalStatusTest() { // TODO unit test for the property 'RenewalStatus' } /// <summary> /// Test the property 'SeatDiscounts' /// </summary> [Test] public void SeatDiscountsTest() { // TODO unit test for the property 'SeatDiscounts' } /// <summary> /// Test the property 'SupportIncidentFee' /// </summary> [Test] public void SupportIncidentFeeTest() { // TODO unit test for the property 'SupportIncidentFee' } /// <summary> /// Test the property 'SupportPlanFee' /// </summary> [Test] public void SupportPlanFeeTest() { // TODO unit test for the property 'SupportPlanFee' } } }
27.65368
125
0.529117
[ "MIT" ]
CameronLoewen/docusign-csharp-client
sdk/src/DocuSign.eSign.Test/Model/AccountBillingPlanTests.cs
6,388
C#
using Xunit; using Veil.Parser; namespace Veil.Handlebars { public class WhitespaceControlTests : ParserTestBase<HandlebarsParser> { [Fact] public void Should_trim_whitespace_from_previous_literal() { var template = Parse("Hello \r\n{{~this}}", typeof(string)); AssertSyntaxTree( template, SyntaxTree.WriteString("Hello"), SyntaxTree.WriteExpression(SyntaxTreeExpression.Self(typeof(string)), true) ); } [Fact] public void Should_trim_whitespace_from_next_literal() { var template = Parse("Hello {{this~}}\r\n!", typeof(string)); AssertSyntaxTree( template, SyntaxTree.WriteString("Hello "), SyntaxTree.WriteExpression(SyntaxTreeExpression.Self(typeof(string)), true), SyntaxTree.WriteString("!") ); } } }
30.40625
92
0.567318
[ "MIT" ]
csainty/Veil
src/Veil.Tests/Handlebars/WhitespaceControlTests.cs
975
C#
// Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software distributed // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. namespace MassTransit.Monitoring.Performance { using System; using System.Collections.Generic; using System.Diagnostics; public class ConsumerPerformanceCounters : BaseWindowsPerformanceCounters { ConsumerPerformanceCounters() : base(BuiltInCounters.Consumers.Category.Name, BuiltInCounters.Consumers.Category.Help) { } public static CounterCreationData ConsumeRate => Cached.Instance.Value.Data[0]; public static CounterCreationData TotalMessages => Cached.Instance.Value.Data[1]; public static CounterCreationData Duration => Cached.Instance.Value.Data[2]; public static CounterCreationData DurationBase => Cached.Instance.Value.Data[3]; public static CounterCreationData TotalFaults => Cached.Instance.Value.Data[4]; public static CounterCreationData FaultPercentage => Cached.Instance.Value.Data[5]; public static CounterCreationData FaultPercentageBase => Cached.Instance.Value.Data[6]; public static void Install() { ConsumerPerformanceCounters value = Cached.Instance.Value; } protected override IEnumerable<CounterCreationData> GetCounterData() { yield return Convert(BuiltInCounters.Consumers.Counters.MessagesPerSecond, PerformanceCounterType.RateOfCountsPerSecond32); yield return Convert(BuiltInCounters.Consumers.Counters.TotalMessages, PerformanceCounterType.NumberOfItems64); yield return Convert(BuiltInCounters.Consumers.Counters.AverageDuration, PerformanceCounterType.AverageCount64); yield return Convert(BuiltInCounters.Consumers.Counters.AverageDurationBase, PerformanceCounterType.AverageBase); yield return Convert(BuiltInCounters.Consumers.Counters.TotalFaults, PerformanceCounterType.NumberOfItems64); yield return Convert(BuiltInCounters.Consumers.Counters.FaultPercent, PerformanceCounterType.AverageCount64); yield return Convert(BuiltInCounters.Consumers.Counters.FaultPercentBase, PerformanceCounterType.AverageBase); } static class Cached { internal static readonly Lazy<ConsumerPerformanceCounters> Instance = new Lazy<ConsumerPerformanceCounters>(() => new ConsumerPerformanceCounters()); } } }
53.22807
162
0.727423
[ "Apache-2.0" ]
zengdl/MassTransit
src/MassTransit/Monitoring/Performance/Windows/ConsumerPerformanceCounters.cs
3,036
C#
using System; using System.Drawing.Imaging; using System.IO; using System.Security.AccessControl; using System.Security.Principal; using System.Windows.Input; namespace PipeShot.Libraries.Helper { public static class ConfigHelper { #region Properties //Value whether PipeShot should strech over all screens or not public static bool AllMonitors => JsonConfig.AllMonitors; //The Image Format for normal Images public static ImageFormat ImageFormat => JsonConfig.ImageFormat; //Value whether PipeShot should open the uploaded Image in Browser after upload public static bool OpenBrowserAfterUpload => JsonConfig.OpenBrowserAfterUpload; //Value whether PipeShot should open the saved Image in Windows Explorer after upload public static bool OpenFileAfterSnap => JsonConfig.OpenFileAfterSnap; //Key for PipeShot Image Shortcut public static Key ShortcutImgKey => JsonConfig.ShortcutImgKey; //Key for PipeShot GIF Shortcut public static Key ShortcutGifKey => JsonConfig.ShortcutGifKey; //Use PrintKey for PipeShot Shortcut? public static bool UsePrint => JsonConfig.UsePrint; //The Path where images should be saved (if enabled) public static string SaveImagesPath { get { string path = JsonConfig.SaveImagesPath; string ret = CanWrite(path) ? path : DocumentsDirectory; return ret; } } //Value wether Images should be saved or not public static bool SaveImages => JsonConfig.SaveImages; //Value wether upload Images to Imgur or copy to Clipboard public static AfterSnipe AfterSnipeAction => JsonConfig.AfterSnipeAction; //Last Time, PipeShot checked for Updates public static DateTime LastChecked => JsonConfig.LastChecked; //Text Language public static string Language => JsonConfig.Language; //Frames per Second of GIF Capture public static int GifFps => JsonConfig.GifFps; //Maximum GIF Length in Milliseconds public static int GifLength => JsonConfig.GifLength; //Show Mouse Cursor on Screenshot public static bool ShowMouse => JsonConfig.ShowMouse; //Freeze Screen on Image Capture public static bool FreezeScreen => JsonConfig.FreezeScreen; //Value whether PipeShot should automatically search for Updates public static bool AutoUpdate => JsonConfig.AutoUpdate; //Quality of Image (1 being lowest, 100 being highest) public static long Quality => JsonConfig.Quality; #endregion #region Imgur Account //Does Imgur Refresh Token exist? public static bool TokenExists => File.Exists(TokenPath); //Path to Imgur User Refresh Token public static string TokenPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PipeShot", "refreshtoken.imgurtoken"); public static string ReadRefreshToken() { if (!File.Exists(TokenPath)) { File.Create(TokenPath); return null; } string token = File.ReadAllText(TokenPath); if (string.IsNullOrWhiteSpace(token)) { return null; } token = Cipher.Decrypt(token, PassPhrase); return token; } #endregion public static Settings JsonConfig; public static string DocumentsDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PipeShot"); public static string ConfigFile => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PipeShot", "config.json"); //Path to Installation Folder public static string InstallDir => AppDomain.CurrentDomain.BaseDirectory; //Salt for Cipher Encryption private const string PassPhrase = "PipeShot User-Login File_PassPhrase :)"; public static void Exists() { if (!Directory.Exists(DocumentsDirectory)) { Directory.CreateDirectory(DocumentsDirectory); } if (!File.Exists(ConfigFile)) { File.WriteAllText(ConfigFile, "{}"); } } //Check for Write Access to Directory public static bool CanWrite(string path) { try { bool writeAllow = false; bool writeDeny = false; DirectorySecurity accessControlList = Directory.GetAccessControl(path); AuthorizationRuleCollection accessRules = accessControlList?.GetAccessRules(true, true, typeof(SecurityIdentifier)); if (accessRules == null) { return false; } foreach (FileSystemAccessRule rule in accessRules) { if ((FileSystemRights.Write & rule.FileSystemRights) != FileSystemRights.Write) { continue; } switch (rule.AccessControlType) { case AccessControlType.Allow: writeAllow = true; break; default: writeDeny = true; break; } } return writeAllow && !writeDeny; } catch { return false; } } } /// <summary> /// Action after Sniping /// </summary> public enum AfterSnipe { UploadImgur, CopyClipboard, DoNothing } public class Settings { public bool AllMonitors = true; public bool AutoUpdate = true; public bool ShowMouse = true; public bool FreezeScreen = false; public bool UsePrint = false; public bool OpenBrowserAfterUpload = true; public bool OpenFileAfterSnap = false; public bool SaveImages = false; public int GifFps = 10; public int GifLength = 12000; public long Quality = 90; public string Language = null; public string SaveImagesPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "PipeShotImages"); public AfterSnipe AfterSnipeAction = AfterSnipe.UploadImgur; public Key ShortcutGifKey = Key.G; public Key ShortcutImgKey = Key.C; public DateTime LastChecked = DateTime.Now; public ImageFormat ImageFormat = ImageFormat.Png; } }
33.641791
106
0.611949
[ "MIT" ]
PipeRift/Pipeshot
PipeShot/Libraries/Helper/ConfigHelper.cs
6,764
C#
/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// GetDirectory Request Marshaller /// </summary> public class GetDirectoryRequestMarshaller : IMarshaller<IRequest, GetDirectoryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetDirectoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetDirectoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "POST"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/directory/get"; request.MarshallerVersion = 2; if(publicRequest.IsSetDirectoryArn()) request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; return request; } private static GetDirectoryRequestMarshaller _instance = new GetDirectoryRequestMarshaller(); internal static GetDirectoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDirectoryRequestMarshaller Instance { get { return _instance; } } } }
34.101124
139
0.65173
[ "Apache-2.0" ]
DetlefGolze/aws-sdk-net
sdk/src/Services/CloudDirectory/Generated/Model/Internal/MarshallTransformations/GetDirectoryRequestMarshaller.cs
3,035
C#
using System.Runtime.Serialization; using System.ServiceModel; // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together. [ServiceContract] public interface IService { [OperationContract] string GetData(int value); [OperationContract] CompositeType GetDataUsingDataContract(CompositeType composite); // TODO: Add your service operations here } // Use a data contract as illustrated in the sample below to add composite types to service operations. [DataContract] public class CompositeType { [DataMember] public bool BoolValue { get; set; } = true; [DataMember] public string StringValue { get; set; } = "Hello "; }
25.821429
143
0.759336
[ "MIT" ]
darcane/CorporateBackend
Corp.AdventureWorks.WcfService/App_Code/IService.cs
725
C#
/** * Copyright 2016 d-fens GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using biz.dfch.CS.Appclusive.Public.Configuration; using biz.dfch.CS.Appclusive.Public.Converters; namespace net.sharedop.Appclusive.Products.Example1.v001 { public partial class ExampleProduct { // this state transition is defined via schema form and uses the default naming convention, // which is: ExampleProductSetPercentage [UserInterface(biz.dfch.CS.Appclusive.Public.Constants.Configuration.UserInterface.UserInterfaceTypeEnum.AngularSchemaForm)] public class SetPercentage : EntityKindStateTransitionBaseDto { [EntityBag(Constants.ExampleProduct.Percentage)] [Range(Constants.ExampleProduct.PercentageMin, Constants.ExampleProduct.PercentageMax)] [DefaultValue(Constants.ExampleProduct.PercentageDefault)] [Unit("%")] public virtual double Percentage { get; set; } } } }
40.230769
132
0.734863
[ "Apache-2.0" ]
dfensgmbh/net.sharedop.Appclusive.Products
src/net.sharedop.Appclusive.Products/Example1/v001/ExampleProductSetPercentage.cs
1,571
C#
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. using IdentityServer4.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace IdentityServer4.Quickstart.UI { [SecurityHeaders] [AllowAnonymous] public class HomeController : Controller { private readonly IIdentityServerInteractionService _interaction; private readonly IHostingEnvironment _environment; public HomeController(IIdentityServerInteractionService interaction, IHostingEnvironment environment) { _interaction = interaction; _environment = environment; } public IActionResult Index() { if (_environment.IsDevelopment()) { // only show in development return View(); } return NotFound(); } /// <summary> /// Shows the error page /// </summary> public async Task<IActionResult> Error(string errorId) { var vm = new ErrorViewModel(); // retrieve error details from identityserver var message = await _interaction.GetErrorContextAsync(errorId); if (message != null) { vm.Error = message; if (!_environment.IsDevelopment()) { // only show in development message.ErrorDescription = null; } } return View("Error", vm); } } }
29.016667
109
0.594486
[ "MIT" ]
Anberm/coolstore-microservices
src/services/idp/Quickstart/Home/HomeController.cs
1,741
C#
/*-----------------------------+-------------------------------\ | | | !!!NOTICE!!! | | | | These libraries are under heavy development so they are | | subject to make many changes as development continues. | | For this reason, the libraries may not be well commented. | | THANK YOU for supporting forge with all your feedback | | suggestions, bug reports and comments! | | | | - The Forge Team | | Bearded Man Studios, Inc. | | | | This source code, project files, and associated files are | | copyrighted by Bearded Man Studios, Inc. (2012-2017) and | | may not be redistributed without written permission. | | | \------------------------------+------------------------------*/ using BeardedManStudios.Forge.Networking.Frame; using BeardedManStudios.Threading; using System; using System.Collections.Generic; using System.Net; using System.Threading; using System.Linq; #if WINDOWS_UWP using Windows.Networking.Sockets; using System.IO; #else using System.Net.Sockets; #endif namespace BeardedManStudios.Forge.Networking { /// <summary> /// This is the main TCP server object responsible for listening for incomming connections /// and reading any data sent from clients who are currently connected /// </summary> public class TCPServer : BaseTCP, IServer { private CommonServerLogic commonServerLogic; #region Delegates /// <summary> /// A delegate for handling any raw TcpClient events /// </summary> #if WINDOWS_UWP public delegate void RawTcpClientEvent(StreamSocket client); #else public delegate void RawTcpClientEvent(TcpClient client); #endif #endregion #region Events /// <summary> /// Occurs when a raw TcpClient has successfully connected /// </summary> public event RawTcpClientEvent rawClientConnected; /// <summary> /// Occurs when raw TcpClient has successfully connected /// </summary> public event RawTcpClientEvent rawClientDisconnected; /// <summary> /// Occurs when raw TcpClient has been forcibly closed /// </summary> public event RawTcpClientEvent rawClientForceClosed; #endregion /// <summary> /// The main listener for client connections /// </summary> #if WINDOWS_UWP private StreamSocketListener listener = null; #else private TcpListener listener = null; #endif /// <summary> /// The ip address that is being bound to /// </summary> private IPAddress ipAddress = null; /// <summary> /// The main thread that will continuiously listen for new client connections /// </summary> //private Thread connectionThread = null; /// <summary> /// The raw list of all of the clients that are connected /// </summary> #if WINDOWS_UWP private List<StreamSocket> rawClients = new List<StreamSocket>(); #else private List<TcpClient> rawClients = new List<TcpClient>(); #endif protected List<FrameStream> bufferedMessages = new List<FrameStream>(); /// <summary> /// Used to determine if this server is currently accepting connections /// </summary> public bool AcceptingConnections { get; private set; } public List<string> BannedAddresses { get; set; } public TCPServer(int maxConnections) : base(maxConnections) { AcceptingConnections = true; BannedAddresses = new List<string>(); commonServerLogic = new CommonServerLogic(this); } #if WINDOWS_UWP private void RawWrite(StreamSocket client, byte[] data) #else private void RawWrite(TcpClient client, byte[] data) #endif { #if WINDOWS_UWP //Write data to the echo server. Stream streamOut = client.OutputStream.AsStreamForWrite(); StreamWriter writer = new StreamWriter(streamOut); writer.Write(data); writer.Flush(); #else client.GetStream().Write(data, 0, data.Length); #endif } /// <summary> /// The direct byte send method to the specified client /// </summary> /// <param name="client">The target client that will receive the frame</param> /// <param name="frame">The frame that is to be sent to the specified client</param> #if WINDOWS_UWP public bool Send(StreamSocket client, FrameStream frame) #else public bool Send(TcpClient client, FrameStream frame) #endif { if (client == null) return false; // Make sure that we don't have any race conditions with writing to the same client lock (client) { try { // Get the raw bytes from the frame and send them byte[] data = frame.GetData(); RawWrite(client, data); return true; } catch { // The client is no longer connected or is unresponsive } } return false; } /// <summary> /// Sends binary message to the specific tcp client(s) /// </summary> /// <param name="client">The client to receive the message</param> /// <param name="receivers">Receiver's type</param> /// <param name="messageGroupId">The Binary.GroupId of the massage, use MessageGroupIds.START_OF_GENERIC_IDS + desired_id</param> /// <param name="objectsToSend">Array of vars to be sent, read them with Binary.StreamData.GetBasicType<typeOfObject>()</param> public bool Send(TcpClient client, Receivers receivers = Receivers.Target, int messageGroupId = MessageGroupIds.START_OF_GENERIC_IDS, params object[] objectsToSend) { BMSByte data = ObjectMapper.BMSByte(objectsToSend); Binary sendFrame = new Binary(Time.Timestep, false, data, Receivers.Target, messageGroupId, false); #if WINDOWS_UWP public bool Send(StreamSocket client, FrameStream frame) #else return Send(client, sendFrame); #endif } /// <summary> /// Send a frame to a specific player /// </summary> /// <param name="frame">The frame to send to that specific player</param> /// <param name="targetPlayer">The specific player to receive the frame</param> public void SendToPlayer(FrameStream frame, NetworkingPlayer targetPlayer) { if (frame.Receivers == Receivers.AllBuffered || frame.Receivers == Receivers.OthersBuffered) bufferedMessages.Add(frame); lock (Players) { if (Players.Contains(targetPlayer)) { NetworkingPlayer player = Players[Players.IndexOf(targetPlayer)]; if (!player.Accepted && !player.PendingAccepted) return; if (player == frame.Sender) { // Don't send a message to the sending player if it was meant for others if (frame.Receivers == Receivers.Others || frame.Receivers == Receivers.OthersBuffered || frame.Receivers == Receivers.OthersProximity || frame.Receivers == Receivers.OthersProximityGrid) return; } // Check to see if the request is based on proximity if (frame.Receivers == Receivers.AllProximity || frame.Receivers == Receivers.OthersProximity) { // If the target player is not in the same proximity zone as the sender // then it should not be sent to that player if (player.ProximityLocation.DistanceSquared(frame.Sender.ProximityLocation) > ProximityDistance*ProximityDistance) { return; } } // Check to see if the request is based on proximity grid if (frame.Receivers == Receivers.AllProximityGrid || frame.Receivers == Receivers.OthersProximityGrid) { // If the target player is not in the same proximity zone as the sender // then it should not be sent to that player if (player.gridPosition.IsSameOrNeighbourCell(frame.Sender.gridPosition)) { return; } } try { Send(player.TcpClientHandle, frame); } catch { Disconnect(player, true); } } } } /// <summary> /// Sends binary message to the specific client /// </summary> /// <param name="receivers">The clients / server to receive the message</param> /// <param name="messageGroupId">The Binary.GroupId of the massage, use MessageGroupIds.START_OF_GENERIC_IDS + desired_id</param> /// <param name="targetPlayer">The client to receive the message</param> /// <param name="objectsToSend">Array of vars to be sent, read them with Binary.StreamData.GetBasicType<typeOfObject>()</param> public void SendToPlayer(NetworkingPlayer targetPlayer, Receivers receivers = Receivers.Target, int messageGroupId = MessageGroupIds.START_OF_GENERIC_IDS, params object[] objectsToSend) { BMSByte data = ObjectMapper.BMSByte(objectsToSend); Binary sendFrame = new Binary(Time.Timestep, false, data, receivers, messageGroupId, false); SendToPlayer(sendFrame, targetPlayer); } /// <summary> /// Goes through all of the currently connected players and send them the frame /// </summary> /// <param name="frame">The frame to send to all of the connected players</param> public void SendAll(FrameStream frame, NetworkingPlayer skipPlayer = null) { if (frame.Receivers == Receivers.AllBuffered || frame.Receivers == Receivers.OthersBuffered) bufferedMessages.Add(frame); lock (Players) { foreach (NetworkingPlayer player in Players) { if (!commonServerLogic.PlayerIsReceiver(player, frame, ProximityDistance, skipPlayer, ProximityModeUpdateFrequency)) continue; try { Send(player.TcpClientHandle, frame); } catch { Disconnect(player, true); } } } } // overload for ncw field distance check case public void SendAll(FrameStream frame, NetworkingPlayer sender, NetworkingPlayer skipPlayer = null) { if (frame.Receivers == Receivers.AllBuffered || frame.Receivers == Receivers.OthersBuffered) bufferedMessages.Add(frame); lock (Players) { foreach (NetworkingPlayer player in Players) { // check for distance here so the owner doesn't need to be sent in stream, used for NCW field proximity check if (!commonServerLogic.PlayerIsDistanceReceiver(sender, player, frame, ProximityDistance, ProximityModeUpdateFrequency)) continue; if (!commonServerLogic.PlayerIsReceiver(player, frame, ProximityDistance, skipPlayer, ProximityModeUpdateFrequency)) continue; try { Send(player.TcpClientHandle, frame); } catch { Disconnect(player, true); } } } } /// <summary> /// Goes through all of the currently connected players and send them the frame /// </summary> /// <param name="receivers">The clients / server to receive the message</param> /// <param name="messageGroupId">The Binary.GroupId of the massage, use MessageGroupIds.START_OF_GENERIC_IDS + desired_id</param> /// <param name="playerToIgnore">The client to ignore</param> /// <param name="objectsToSend">Array of vars to be sent, read them with Binary.StreamData.GetBasicType<typeOfObject>()</param> public void SendAll(Receivers receivers = Receivers.All, int messageGroupId = MessageGroupIds.START_OF_GENERIC_IDS, NetworkingPlayer playerToIgnore = null, params object[] objectsToSend) { BMSByte data = ObjectMapper.BMSByte(objectsToSend); Binary sendFrame = new Binary(Time.Timestep, false, data, receivers, messageGroupId, true); SendAll(sendFrame, playerToIgnore); } /// <summary> /// Call the base disconnect pending method to remove all pending disconnecting clients /// </summary> private void CleanupDisconnections() { DisconnectPending(RemovePlayer); } /// <summary> /// Commits the disconnects /// </summary> public void CommitDisconnects() { CleanupDisconnections(); } /// <summary> /// This will begin the connection for TCP, this is a thread blocking operation until the connection /// is either established or has failed /// </summary> /// <param name="hostAddress">[127.0.0.1] Ip Address to host from</param> /// <param name="port">[15937] Port to allow connections from</param> public void Connect(string hostAddress = "0.0.0.0", ushort port = DEFAULT_PORT) { if (Disposed) throw new ObjectDisposedException("TCPServer", "This object has been disposed and can not be used to connect, please use a new TCPServer"); if (string.IsNullOrEmpty(hostAddress)) throw new BaseNetworkException("An ip address must be specified to bind to. If you are unsure, you can set to 127.0.0.1"); // Check to see if this server is being bound to a "loopback" address, if so then bind to any, otherwise bind to specified address if (hostAddress == "0.0.0.0" || hostAddress == "localhost") ipAddress = IPAddress.Any; else ipAddress = IPAddress.Parse(hostAddress); try { // Setup and start the base C# TcpListner listener = new TcpListener(ipAddress, port); //listener.Start(); Me = new NetworkingPlayer(ServerPlayerCounter++, "0.0.0.0", true, listener, this); Me.InstanceGuid = InstanceGuid.ToString(); // Create the thread that will be listening for clients and start its execution //Thread connectionThread = new Thread(new ThreadStart(ListenForConnections)); //connectionThread.Start(); //Task.Queue(ListenForConnections); listener.Start(); listener.BeginAcceptTcpClient(ListenForConnections, listener); // Do any generic initialization in result of the successful bind OnBindSuccessful(); // Create the thread that will be listening for new data from connected clients and start its execution Task.Queue(ReadClients); // Create the thread that will check for player timeouts Task.Queue(() => { commonServerLogic.CheckClientTimeout((player) => { Disconnect(player, true); OnPlayerTimeout(player); CleanupDisconnections(); }); }); //Let myself know I connected successfully OnPlayerConnected(Me); // Set myself as a connected client Me.Connected = true; //Set the port SetPort((ushort)((IPEndPoint)listener.LocalEndpoint).Port); } catch (Exception e) { Logging.BMSLog.LogException(e); // Do any generic initialization in result of the binding failure OnBindFailure(); throw new FailedBindingException("Failed to bind to host/port, see inner exception", e); } } /// <summary> /// Infinite loop listening for client connections on a separate thread. /// This loop breaks if there is an exception thrown on the blocking accept call /// </summary> private void ListenForConnections(IAsyncResult obj) { TcpListener asyncListener = (TcpListener)obj.AsyncState; TcpClient client = null; try { client = asyncListener.EndAcceptTcpClient(obj); } catch { return; } asyncListener.BeginAcceptTcpClient(ListenForConnections, asyncListener); if (rawClients.Count == MaxConnections) { // Tell the client why they are being disconnected Send(client, Error.CreateErrorMessage(Time.Timestep, "Max Players Reached On Server", false, MessageGroupIds.MAX_CONNECTIONS, true)); // Send the close connection frame to the client Send(client, new ConnectionClose(Time.Timestep, false, Receivers.Target, MessageGroupIds.DISCONNECT, true)); // Do disconnect logic for client ClientRejected(client, false); return; } else if (!AcceptingConnections) { // Tell the client why they are being disconnected Send(client, Error.CreateErrorMessage(Time.Timestep, "The server is busy and not accepting connections", false, MessageGroupIds.MAX_CONNECTIONS, true)); // Send the close connection frame to the client Send(client, new ConnectionClose(Time.Timestep, false, Receivers.Target, MessageGroupIds.DISCONNECT, true)); // Do disconnect logic for client ClientRejected(client, false); return; } // Clients will be looped through on other threads so be sure to lock it before adding lock (Players) { rawClients.Add(client); // Create the identity wrapper for this player NetworkingPlayer player = new NetworkingPlayer(ServerPlayerCounter++, client.Client.RemoteEndPoint.ToString(), false, client, this); // Generically add the player and fire off the events attached to player joining OnPlayerConnected(player); } // Let all of the event listeners know that the client has successfully connected if (rawClientConnected != null) rawClientConnected(client); } /// <summary> /// Infinite loop listening for new data from all connected clients on a separate thread. /// This loop breaks when readThreadCancel is set to true /// </summary> private void ReadClients() { // Intentional infinite loop while (IsBound && !NetWorker.EndingSession) { try { // If the read has been flagged to be canceled then break from this loop if (readThreadCancel) return; // This will loop through all of the players, so make sure to set the lock to // prevent any changes from other threads lock (Players) { for (int i = 0; i < Players.Count; i++) { // If the read has been flagged to be canceled then break from this loop if (readThreadCancel) return; NetworkStream playerStream = null; if (Players[i].IsHost) continue; try { lock (Players[i].MutexLock) { // Try to get the client stream if it is still available playerStream = Players[i].TcpClientHandle.GetStream(); } } catch { // Failed to get the stream for the client so forcefully disconnect it //Console.WriteLine("Exception: Failed to get stream for client (Forcefully disconnecting)"); Disconnect(Players[i], true); continue; } // If the player is no longer connected, then make sure to disconnect it properly if (!Players[i].TcpClientHandle.Connected) { Disconnect(Players[i], false); continue; } // Only continue to read for this client if there is any data available for it if (!playerStream.DataAvailable) continue; int available = Players[i].TcpClientHandle.Available; // Determine if the player is fully connected if (!Players[i].Accepted) { // Determine if the player has been accepted by the server if (!Players[i].Connected) { lock (Players[i].MutexLock) { // Read everything from the stream as the client hasn't been accepted yet byte[] bytes = new byte[available]; playerStream.Read(bytes, 0, bytes.Length); // Validate that the connection headers are properly formatted byte[] response = Websockets.ValidateConnectionHeader(bytes); // The response will be null if the header sent is invalid, if so then disconnect client as they are sending invalid headers if (response == null) { OnPlayerRejected(Players[i]); Disconnect(Players[i], false); continue; } // If all is in order then send the validated response to the client playerStream.Write(response, 0, response.Length); // The player has successfully connected Players[i].Connected = true; } } else { lock (Players[i].MutexLock) { // Consume the message even though it is not being used so that it is removed from the buffer Text frame = (Text)Factory.DecodeMessage(GetNextBytes(playerStream, available, true), true, MessageGroupIds.TCP_FIND_GROUP_ID, Players[i]); Players[i].InstanceGuid = frame.ToString(); bool rejected; OnPlayerGuidAssigned(Players[i], out rejected); // If the player was rejected during the handling of the playerGuidAssigned event, don't accept them. if (rejected) continue; lock (writeBuffer) { writeBuffer.Clear(); writeBuffer.Append(BitConverter.GetBytes(Players[i].NetworkId)); Send(Players[i].TcpClientHandle, new Binary(Time.Timestep, false, writeBuffer, Receivers.Target, MessageGroupIds.NETWORK_ID_REQUEST, true)); SendBuffer(Players[i]); // All systems go, the player has been accepted OnPlayerAccepted(Players[i]); } } } } else { try { lock (Players[i].MutexLock) { Players[i].Ping(); // Get the frame that was sent by the client, the client // does send masked data //TODO: THIS IS CAUSING ISSUES!!! WHY!?!?!!? FrameStream frame = Factory.DecodeMessage(GetNextBytes(playerStream, available, true), true, MessageGroupIds.TCP_FIND_GROUP_ID, Players[i]); // The client has told the server that it is disconnecting if (frame is ConnectionClose) { // Confirm the connection close Send(Players[i].TcpClientHandle, new ConnectionClose(Time.Timestep, false, Receivers.Target, MessageGroupIds.DISCONNECT, true)); Disconnect(Players[i], false); continue; } FireRead(frame, Players[i]); } } catch { // The player is sending invalid data so disconnect them Disconnect(Players[i], true); } } } } // Go through all of the pending disconnections and clean them // up and finalize the disconnection CleanupDisconnections(); // Sleep so that we free up the CPU a bit from this thread Thread.Sleep(10); } catch (Exception ex) { Logging.BMSLog.LogException(ex); } } } /// <summary> /// Disconnects this server and all of it's clients /// </summary> /// <param name="forced">Used to tell if this disconnect was intentional <c>false</c> or caused by an exception <c>true</c></param> public override void Disconnect(bool forced) { // Since we are disconnecting we need to stop the read thread readThreadCancel = true; lock (Players) { // Stop listening for new connections listener.Stop(); // Go through all of the players and disconnect them foreach (NetworkingPlayer player in Players) Disconnect(player, forced); // Send signals to the methods registered to the disconnec events if (!forced) OnDisconnected(); else OnForcedDisconnect(); } } /// <summary> /// Disconnects a client from this listener /// </summary> /// <param name="client">The target client to be disconnected</param> public void Disconnect(NetworkingPlayer player, bool forced) { commonServerLogic.Disconnect(player, forced, DisconnectingPlayers, ForcedDisconnectingPlayers); } /// <summary> /// Fully remove the player from the network /// </summary> /// <param name="player">The target player</param> /// <param name="forced">If the player is being forcibly removed from an exception</param> private void RemovePlayer(NetworkingPlayer player, bool forced) { lock (Players) { if (player.IsDisconnecting) return; player.IsDisconnecting = true; } // Tell the player that he is getting disconnected Send(player.TcpClientHandle, new ConnectionClose(Time.Timestep, false, Receivers.Target, MessageGroupIds.DISCONNECT, true)); if (!forced) { Task.Queue(() => { FinalizeRemovePlayer(player, forced); }, 1000); } else FinalizeRemovePlayer(player, forced); } private void FinalizeRemovePlayer(NetworkingPlayer player, bool forced) { OnPlayerDisconnected(player); player.TcpClientHandle.Close(); rawClients.Remove(player.TcpClientHandle); if (!forced) { // Let all of the event listeners know that the client has successfully disconnected if (rawClientDisconnected != null) rawClientDisconnected(player.TcpClientHandle); DisconnectingPlayers.Remove(player); } else { // Let all of the event listeners know that this was a forced disconnect if (forced && rawClientForceClosed != null) rawClientForceClosed(player.TcpClientHandle); ForcedDisconnectingPlayers.Remove(player); } } #if WINDOWS_UWP private void ClientRejected(StreamSocket client, bool forced) #else private void ClientRejected(TcpClient client, bool forced) #endif { // Clean up the client objects client.Close(); } private void SendBuffer(NetworkingPlayer player) { foreach (FrameStream frame in bufferedMessages) Send(player.TcpClientHandle, frame); } public override void Ping() { // I am the server, so 0 ms... OnPingRecieved(0, Me); } /// <summary> /// Pong back to the client /// </summary> /// <param name="playerRequesting"></param> protected override void Pong(NetworkingPlayer playerRequesting, DateTime time) { SendToPlayer(GeneratePong(time), playerRequesting); } public void StopAcceptingConnections() { AcceptingConnections = false; } public void StartAcceptingConnections() { AcceptingConnections = true; } public void BanPlayer(ulong networkId, int minutes) { NetworkingPlayer player = Players.FirstOrDefault(p => p.NetworkId == networkId); if (player == null) return; BannedAddresses.Add(player.Ip); Disconnect(player, true); CommitDisconnects(); } public override void FireRead(FrameStream frame, NetworkingPlayer currentPlayer) { // A message has been successfully read from the network so relay that // to all methods registered to the event OnMessageReceived(currentPlayer, frame); } } }
33.461245
194
0.654249
[ "MIT" ]
KarloEldic/ForgeNetworkingRemastered
BeardedManStudios/Source/Forge/Networking/TCPServer.cs
26,336
C#
using System; namespace Lib2 { public class Class2 { } }
7.888889
23
0.577465
[ "MIT" ]
luke1226/vscode_sln_template
Lib2/Class2.cs
73
C#
using System.Collections.Generic; using System.Linq; namespace Microsoft.Rest.ClientRuntime.PowerShell { internal static class CollectionExtensions { public static T[] NullIfEmpty<T>(this T[] collection) => (collection?.Any() ?? false) ? collection : null; public static IEnumerable<T> EmptyIfNull<T>(this IEnumerable<T> collection) => collection ?? Enumerable.Empty<T>(); } }
33.916667
123
0.707617
[ "MIT" ]
NelsonDaniel/autorest.powershell
extensions/powershell/resources/runtime/BuildTime/CollectionExtensions.cs
409
C#
using System.Diagnostics.CodeAnalysis; using AltV.Net.Data; using AltV.Net.Elements.Entities; namespace AltV.Net.Async.Elements.Entities { [SuppressMessage("ReSharper", "InconsistentlySynchronizedField")] // we sometimes use object in lock and sometimes not public class AsyncCheckpoint<TCheckpoint> : AsyncColShape<TCheckpoint>, ICheckpoint where TCheckpoint: class, ICheckpoint { public byte CheckpointType { get { AsyncContext.RunAll(); lock (BaseObject) { if (!AsyncContext.CheckIfExists(BaseObject)) return default; return BaseObject.CheckpointType; } } set { AsyncContext.Enqueue(() => BaseObject.CheckpointType = value); } } public float Height { get { AsyncContext.RunAll(); lock (BaseObject) { if (!AsyncContext.CheckIfExists(BaseObject)) return default; return BaseObject.Height; } } set { AsyncContext.Enqueue(() => BaseObject.Height = value); } } public float Radius { get { AsyncContext.RunAll(); lock (BaseObject) { if (!AsyncContext.CheckIfExists(BaseObject)) return default; return BaseObject.Radius; } } set { AsyncContext.Enqueue(() => BaseObject.Radius = value); } } public Rgba Color { get { AsyncContext.RunAll(); lock (BaseObject) { if (!AsyncContext.CheckIfExists(BaseObject)) return default; return BaseObject.Color; } } set { AsyncContext.Enqueue(() => BaseObject.Color = value); } } public Position NextPosition { get { AsyncContext.RunAll(); lock (BaseObject) { if (!AsyncContext.CheckIfExists(BaseObject)) return default; return BaseObject.NextPosition; } } set { AsyncContext.Enqueue(() => BaseObject.NextPosition = value); } } public AsyncCheckpoint(TCheckpoint checkpoint, IAsyncContext asyncContext) : base(checkpoint, asyncContext) { } } }
30.670588
125
0.492137
[ "MIT" ]
Arochka/coreclr-module
api/AltV.Net.Async/Elements/Entities/AsyncCheckpoint.cs
2,609
C#
using System; namespace VitaliiPianykh.FileWall.Client { public interface IFormBugReport { event EventHandler SendClicked; event EventHandler DontSendClicked; void ShowDialog(); void Hide(); string WhatYouDid { get; } string Email { get; } string Details { get; set; } } }
18.210526
43
0.609827
[ "Apache-2.0" ]
caidongyun/FileWall
Client/FormBugReport/IFormBugReport.cs
348
C#
using System; using NBitcoin; using WalletWasabi.WabiSabi.Crypto.CredentialRequesting; namespace WalletWasabi.WabiSabi.Models { public record InputRegistrationResponse( uint256 AliceId, CredentialsResponse AmountCredentials, CredentialsResponse VsizeCredentials ); }
21.230769
56
0.84058
[ "MIT" ]
0racl3z/WalletWasabi
WalletWasabi/WabiSabi/Models/InputRegistrationResponse.cs
276
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using PetaPoco; namespace RawBencher.Benchers { /// <summary> /// Specific bencher for PetaPocoBencher , doing no-change tracking fetch /// </summary> public class PetaPocoBencher : BencherBase<SalesOrderHeader> { /// <summary> /// Initializes a new instance of the <see cref="PetaPocoBencher" /> class. /// </summary> public PetaPocoBencher() : base(e => e.SalesOrderId, usesChangeTracking:false, usesCaching:false) { } /// <summary> /// Fetches the individual element /// </summary> /// <param name="key">The key of the element to fetch.</param> /// <returns>The fetched element, or null if not found</returns> public override SalesOrderHeader FetchIndividual(int key) { SalesOrderHeader toReturn = null; var dbFactory = new PetaPoco.Database(ConnectionStringToUse, "System.Data.SqlClient"); dbFactory.OpenSharedConnection(); toReturn = dbFactory.First<SalesOrderHeader>(CommandText + " where SalesOrderId=@0", key); dbFactory.CloseSharedConnection(); return toReturn; } /// <summary> /// Fetches the complete set of elements and returns this set as an IEnumerable. /// </summary> /// <returns>the set fetched</returns> public override IEnumerable<SalesOrderHeader> FetchSet() { var headers = new List<SalesOrderHeader>(); var dbFactory = new PetaPoco.Database(ConnectionStringToUse, "System.Data.SqlClient"); dbFactory.OpenSharedConnection(); headers = dbFactory.Fetch<SalesOrderHeader>(CommandText); dbFactory.CloseSharedConnection(); return headers; } /// <summary> /// Creates the name of the framework this bencher is for. Use the overload which accepts a format string and a type to create a name based on a /// specific version /// </summary> /// <returns>the framework name.</returns> protected override string CreateFrameworkNameImpl() { return "PetaPoco v4.0.3"; } #region Properties /// <summary> /// Gets or sets the connection string to use /// </summary> public string ConnectionStringToUse { get; set; } /// <summary> /// Gets or sets the command text. /// </summary> public string CommandText { get; set; } #endregion } }
28.7375
146
0.705524
[ "MIT" ]
SoftFluent/RawDataAccessBencher
RawBencher/Benchers/PetaPocoBencher.cs
2,301
C#
// // X509AsymmetricSecurityKey.cs // // Author: // Atsushi Enomoto <atsushi@ximian.com> // // Copyright (C) 2005 Novell, Inc. http://www.novell.com // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System; using System.Collections.Generic; using System.Xml; using System.IdentityModel.Policy; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; namespace System.IdentityModel.Tokens { public class X509AsymmetricSecurityKey : AsymmetricSecurityKey { public X509AsymmetricSecurityKey (X509Certificate2 certificate) { if (certificate == null) throw new ArgumentNullException ("certificate"); cert = certificate; } X509Certificate2 cert; // AsymmetricSecurityKey implementation public override AsymmetricAlgorithm GetAsymmetricAlgorithm ( string algorithm, bool privateKey) { if (algorithm == null) throw new ArgumentNullException ("algorithm"); if (privateKey && !cert.HasPrivateKey) throw new NotSupportedException ("The certificate does not contain a private key."); AsymmetricAlgorithm alg = privateKey ? cert.PrivateKey : cert.PublicKey.Key; switch (algorithm) { // case SignedXml.XmlDsigDSAUrl: // if (alg is DSA) // return alg; // throw new NotSupportedException (String.Format ("The certificate does not contain DSA private key while '{0}' requires it.", algorithm)); case EncryptedXml.XmlEncRSA15Url: case EncryptedXml.XmlEncRSAOAEPUrl: case SignedXml.XmlDsigRSASHA1Url: case SecurityAlgorithms.RsaSha256Signature: if (alg is RSA) return alg; throw new NotSupportedException (String.Format ("The certificate does not contain RSA private key while '{0}' requires it.", algorithm)); } throw new NotSupportedException (String.Format ("The asymmetric algorithm '{0}' is not supported.", algorithm)); } public override HashAlgorithm GetHashAlgorithmForSignature ( string algorithm) { if (algorithm == null) throw new ArgumentNullException ("algorithm"); switch (algorithm) { //case SignedXml.XmlDsigDSAUrl: // it is documented as supported, but it isn't in reality and it wouldn't be possible. case SignedXml.XmlDsigRSASHA1Url: return new HMACSHA1 (); case SecurityAlgorithms.RsaSha256Signature: return new HMACSHA256 (); default: throw new NotSupportedException (String.Format ("'{0}' Hash algorithm is not supported in this security key.", algorithm)); } } [MonoTODO] public override AsymmetricSignatureDeformatter GetSignatureDeformatter (string algorithm) { throw new NotImplementedException (); } [MonoTODO] public override AsymmetricSignatureFormatter GetSignatureFormatter (string algorithm) { throw new NotImplementedException (); } public override bool HasPrivateKey () { return cert.HasPrivateKey; } // SecurityKey implementation public override int KeySize { get { return cert.PublicKey.Key.KeySize; } } public override byte [] DecryptKey (string algorithm, byte [] keyData) { if (algorithm == null) throw new ArgumentNullException ("algorithm"); if (keyData == null) throw new ArgumentNullException ("keyData"); if (!HasPrivateKey ()) throw new NotSupportedException ("This X509 certificate does not contain private key."); if (cert.PrivateKey.KeyExchangeAlgorithm == null) throw new NotSupportedException ("The exchange algorithm of the X509 certificate private key is null"); switch (algorithm) { case EncryptedXml.XmlEncRSA15Url: case EncryptedXml.XmlEncRSAOAEPUrl: break; default: throw new NotSupportedException (String.Format ("This X509 security key does not support specified algorithm '{0}'", algorithm)); } bool useOAEP = algorithm == EncryptedXml.XmlEncRSAOAEPUrl; return EncryptedXml.DecryptKey (keyData, cert.PrivateKey as RSA, useOAEP); } public override byte [] EncryptKey (string algorithm, byte [] keyData) { if (algorithm == null) throw new ArgumentNullException ("algorithm"); if (keyData == null) throw new ArgumentNullException ("keyData"); switch (algorithm) { case EncryptedXml.XmlEncRSA15Url: case EncryptedXml.XmlEncRSAOAEPUrl: break; default: throw new NotSupportedException (String.Format ("This X509 security key does not support specified algorithm '{0}'", algorithm)); } bool useOAEP = algorithm == EncryptedXml.XmlEncRSAOAEPUrl; return EncryptedXml.EncryptKey (keyData, cert.PublicKey.Key as RSA, useOAEP); } public override bool IsAsymmetricAlgorithm (string algorithm) { return GetAlgorithmSupportType (algorithm) == AlgorithmSupportType.Asymmetric; } public override bool IsSupportedAlgorithm (string algorithm) { switch (algorithm) { case SecurityAlgorithms.RsaV15KeyWrap: case SecurityAlgorithms.RsaOaepKeyWrap: case SecurityAlgorithms.RsaSha1Signature: case SecurityAlgorithms.RsaSha256Signature: return true; default: return false; } } public override bool IsSymmetricAlgorithm (string algorithm) { return GetAlgorithmSupportType (algorithm) == AlgorithmSupportType.Symmetric; } } }
32.989418
143
0.742743
[ "Apache-2.0" ]
121468615/mono
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
6,235
C#
// // General: // This file is part of .NET Bridge // // Copyright: // 2010 Jonathan Shore // 2017 Jonathan Shore and Contributors // // License: // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at: // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // using System; using System.Runtime.InteropServices; namespace bridge.common.io { /// <summary> /// Structure for converting int16 /// </summary> [StructLayout(LayoutKind.Explicit)] internal struct Int16Union { public Int16Union (short v) { b1 = b2 = 0; i = unchecked((ushort)v); } public Int16Union (ushort v) { b1 = b2 = 0; i = v; } public Int16Union (byte[] buffer, int offset = 0) { i = 0; b1 = buffer[offset + 0]; b2 = buffer[offset + 1]; } /// <summary> /// Convert to network form or back (depending on /// </summary> public void Flip () { byte tmp = b1; b1 = b2; b2 = tmp; } /// <summary> /// Convert int in network or local form to bytes /// </summary> /// <returns> public byte[] ToBytes (byte[] buffer) { buffer[0] = b1; buffer[1] = b2; return buffer; } /// <summary> /// Convert to int (in local form presumably) /// </summary> public short ToShort () { return unchecked((short)i); } /// <summary> /// Convert to int (in local form presumably) /// </summary> public ushort ToUShort () { return i; } // Data /// <summary> /// Int32 version of the value. /// </summary> [FieldOffset(0)] public ushort i; /// <summary> /// byte #1 /// </summary> [FieldOffset(0)] public byte b1; /// <summary> /// byte #2 /// </summary> [FieldOffset(1)] public byte b2; } /// <summary> /// Structure for converting int32 /// </summary> [StructLayout(LayoutKind.Explicit)] internal struct Int32Union { public Int32Union (int v) { b1 = b2 = b3 = b4 = 0; i = unchecked((uint)v); } public Int32Union (uint v) { b1 = b2 = b3 = b4 = 0; i = v; } public Int32Union (byte[] buffer, int offset = 0) { i = 0; b1 = buffer[offset + 0]; b2 = buffer[offset + 1]; b3 = buffer[offset + 2]; b4 = buffer[offset + 3]; } /// <summary> /// Convert to network form or back (depending on /// </summary> public void Flip () { byte tmp = b1; b1 = b4; b4 = tmp; tmp = b2; b2 = b3; b3 = tmp; } /// <summary> /// Convert int in network or local form to bytes /// </summary> /// <returns> public byte[] ToBytes (byte[] buffer) { buffer[0] = b1; buffer[1] = b2; buffer[2] = b3; buffer[3] = b4; return buffer; } /// <summary> /// Convert to int (in local form presumably) /// </summary> public int ToInt () { return unchecked ((int)i); } /// <summary> /// Convert to int (in local form presumably) /// </summary> public uint ToUInt () { return i; } // Data /// <summary> /// Int32 version of the value. /// </summary> [FieldOffset(0)] public uint i; /// <summary> /// byte #1 /// </summary> [FieldOffset(0)] public byte b1; /// <summary> /// byte #2 /// </summary> [FieldOffset(1)] public byte b2; /// <summary> /// byte #3 /// </summary> [FieldOffset(2)] public byte b3; /// <summary> /// byte #4 /// </summary> [FieldOffset(3)] public byte b4; } /// <summary> /// Structure for converting long /// </summary> [StructLayout(LayoutKind.Explicit)] internal struct Long64Union { public Long64Union (ulong v) { b1 = b2 = b3 = b4 = b5 = b6 = b7 = b8 = 0; l = v; } public Long64Union (long v) { b1 = b2 = b3 = b4 = b5 = b6 = b7 = b8 = 0; l = unchecked((ulong)v); } public Long64Union (byte[] buffer, int offset = 0) { l = 0; b1 = buffer[offset + 0]; b2 = buffer[offset + 1]; b3 = buffer[offset + 2]; b4 = buffer[offset + 3]; b5 = buffer[offset + 4]; b6 = buffer[offset + 5]; b7 = buffer[offset + 6]; b8 = buffer[offset + 7]; } /// <summary> /// Convert to network form or back (depending on /// </summary> public void Flip () { byte tmp; tmp = b1; b1 = b8; b8 = tmp; tmp = b2; b2 = b7; b7 = tmp; tmp = b3; b3 = b6; b6 = tmp; tmp = b4; b4 = b5; b5 = tmp; } /// <summary> /// Convert int in network or local form to bytes /// </summary> /// <returns> public byte[] ToBytes (byte[] buffer, int offset) { buffer[offset + 0] = b1; buffer[offset + 1] = b2; buffer[offset + 2] = b3; buffer[offset + 3] = b4; buffer[offset + 4] = b5; buffer[offset + 5] = b6; buffer[offset + 6] = b7; buffer[offset + 7] = b8; return buffer; } /// <summary> /// Convert to ulong (in local form presumably) /// </summary> public ulong ToULong () { return l; } /// <summary> /// Convert to long (in local form presumably) /// </summary> public long ToLong () { return unchecked((long)l); } // Data /// <summary> /// Int32 version of the value. /// </summary> [FieldOffset(0)] public ulong l; /// <summary> /// byte #1 /// </summary> [FieldOffset(0)] public byte b1; /// <summary> /// byte #2 /// </summary> [FieldOffset(1)] public byte b2; /// <summary> /// byte #3 /// </summary> [FieldOffset(2)] public byte b3; /// <summary> /// byte #4 /// </summary> [FieldOffset(3)] public byte b4; /// <summary> /// byte #5 /// </summary> [FieldOffset(4)] public byte b5; /// <summary> /// byte #6 /// </summary> [FieldOffset(5)] public byte b6; /// <summary> /// byte #7 /// </summary> [FieldOffset(6)] public byte b7; /// <summary> /// byte #8 /// </summary> [FieldOffset(7)] public byte b8; } /// <summary> /// Structure for converting doubles /// </summary> [StructLayout(LayoutKind.Explicit)] internal struct Float64Union { public Float64Union (double v) { b1 = b2 = b3 = b4 = b5 = b6 = b7 = b8 = 0; d = v; } public Float64Union (byte[] buffer, int offset = 0) { d = 0; b1 = buffer[offset + 0]; b2 = buffer[offset + 1]; b3 = buffer[offset + 2]; b4 = buffer[offset + 3]; b5 = buffer[offset + 4]; b6 = buffer[offset + 5]; b7 = buffer[offset + 6]; b8 = buffer[offset + 7]; } /// <summary> /// Convert to network form or back (depending on /// </summary> public void Flip () { byte tmp; tmp = b1; b1 = b8; b8 = tmp; tmp = b2; b2 = b7; b7 = tmp; tmp = b3; b3 = b6; b6 = tmp; tmp = b4; b4 = b5; b5 = tmp; } /// <summary> /// Convert int in network or local form to bytes /// </summary> /// <returns> public byte[] ToBytes (byte[] buffer) { buffer[0] = b1; buffer[1] = b2; buffer[2] = b3; buffer[3] = b4; buffer[4] = b5; buffer[5] = b6; buffer[6] = b7; buffer[7] = b8; return buffer; } /// <summary> /// Convert to int (in local form presumably) /// </summary> public double ToDouble () { return d; } // Data /// <summary> /// float64 version of the value. /// </summary> [FieldOffset(0)] public double d; /// <summary> /// byte #1 /// </summary> [FieldOffset(0)] public byte b1; /// <summary> /// byte #2 /// </summary> [FieldOffset(1)] public byte b2; /// <summary> /// byte #3 /// </summary> [FieldOffset(2)] public byte b3; /// <summary> /// byte #4 /// </summary> [FieldOffset(3)] public byte b4; /// <summary> /// byte #5 /// </summary> [FieldOffset(4)] public byte b5; /// <summary> /// byte #6 /// </summary> [FieldOffset(5)] public byte b6; /// <summary> /// byte #7 /// </summary> [FieldOffset(6)] public byte b7; /// <summary> /// byte #8 /// </summary> [FieldOffset(7)] public byte b8; } }
17.762712
80
0.544609
[ "Apache-2.0" ]
Anabad/.Net-Bridge
src/DotNet/Library/src/common/io/BitConversions.cs
8,386
C#
/* Copyright (C) 2019-2021 Junruoyu Zheng. Home page: https://junruoyu-zheng.gitee.io/ligral Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ using System; using System.Collections.Generic; using Xunit; using MathNet.Numerics.LinearAlgebra; using Ligral.Component; namespace Ligral.Tests.ModelTester { public class TestCos { [Fact] public void Cos_InputZero_OutputSin() { var model = ModelManager.Create("Cos"); var modelTester = new ModelTester(); var inputs = new List<Matrix<double>> {0.ToMatrix()}; var outputs = new List<Matrix<double>> {1.ToMatrix()}; Assert.True(modelTester.Test(model, inputs, outputs)); } [Fact] public void Cos_InputNegative_OutputNegative() { var model = ModelManager.Create("Cos"); var modelTester = new ModelTester(); var inputs = new List<Matrix<double>> {-10.ToMatrix()}; var outputs = new List<Matrix<double>> {Math.Cos(-10).ToMatrix()}; Assert.True(modelTester.Test(model, inputs, outputs)); } [Fact] public void Cos_InputPositive_OutputPositive() { var model = ModelManager.Create("Cos"); var modelTester = new ModelTester(); var inputs = new List<Matrix<double>> {1.3.ToMatrix()}; var outputs = new List<Matrix<double>> {Math.Cos(1.3).ToMatrix()}; Assert.True(modelTester.Test(model, inputs, outputs)); } [Fact] public void Cos_InputLargePositive_OutputPositive() { var model = ModelManager.Create("Cos"); var modelTester = new ModelTester(); var inputs = new List<Matrix<double>> {(1.3+10*Math.PI).ToMatrix()}; var outputs = new List<Matrix<double>> {Math.Cos(1.3).ToMatrix()}; Assert.True(modelTester.Test(model, inputs, outputs)); } [Fact] public void Cos_InputMatrix_OutputMatrix() { var model = ModelManager.Create("Cos"); var modelTester = new ModelTester(); var inputs = new List<Matrix<double>> {Matrix<double>.Build.DenseOfArray(new double[2,3]{{1, -2, 3}, {-4.707, 5.707, 100}})}; Assert.True(modelTester.Test(model, inputs, inputs.ConvertAll(matrix => matrix.Map(item => Math.Cos(item))))); } } }
39.870968
137
0.601133
[ "MIT" ]
JRY-Zheng/ligral
test/ModelComputation/TestCos.cs
2,472
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SaaSEqt.IdentityAccess.Application.Commands { public class AddGroupToGroupCommand { public AddGroupToGroupCommand() { } public AddGroupToGroupCommand(string tenantId, string childGroupName, string parentGroupName) { this.TenantId = tenantId; this.ChildGroupName = childGroupName; this.ParentGroupName = parentGroupName; } public string TenantId { get; set; } public string ChildGroupName { get; set; } public string ParentGroupName { get; set; } } }
25.769231
101
0.656716
[ "MIT" ]
Liang-Zhinian/CqrsFrameworkDotNet
Sample/Reservation/src/Services/IdentityAccess/IdentityAccess/Application/Commands/AddGroupToGroupCommand.cs
672
C#
/* * Camunda BPM REST API * * OpenApi Spec for Camunda BPM REST API. * * The version of the OpenAPI document: 7.13.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using RestSharp; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Api { /// <summary> /// Represents a collection of functions to interact with the API endpoints /// </summary> public interface ITaskIdentityLinkApi : IApiAccessor { #region Synchronous Operations /// <summary> /// /// </summary> /// <remarks> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns></returns> void AddIdentityLink (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> AddIdentityLinkWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Removes an identity link from a task by id /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns></returns> void DeleteIdentityLink (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Removes an identity link from a task by id /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> DeleteIdentityLinkWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>List&lt;IdentityLinkDto&gt;</returns> List<IdentityLinkDto> GetIdentityLinks (string id, string type = default(string)); /// <summary> /// /// </summary> /// <remarks> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>ApiResponse of List&lt;IdentityLinkDto&gt;</returns> ApiResponse<List<IdentityLinkDto>> GetIdentityLinksWithHttpInfo (string id, string type = default(string)); #endregion Synchronous Operations #region Asynchronous Operations /// <summary> /// /// </summary> /// <remarks> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of void</returns> System.Threading.Tasks.Task AddIdentityLinkAsync (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of ApiResponse</returns> System.Threading.Tasks.Task<ApiResponse<Object>> AddIdentityLinkAsyncWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Removes an identity link from a task by id /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of void</returns> System.Threading.Tasks.Task DeleteIdentityLinkAsync (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Removes an identity link from a task by id /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of ApiResponse</returns> System.Threading.Tasks.Task<ApiResponse<Object>> DeleteIdentityLinkAsyncWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)); /// <summary> /// /// </summary> /// <remarks> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>Task of List&lt;IdentityLinkDto&gt;</returns> System.Threading.Tasks.Task<List<IdentityLinkDto>> GetIdentityLinksAsync (string id, string type = default(string)); /// <summary> /// /// </summary> /// <remarks> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </remarks> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>Task of ApiResponse (List&lt;IdentityLinkDto&gt;)</returns> System.Threading.Tasks.Task<ApiResponse<List<IdentityLinkDto>>> GetIdentityLinksAsyncWithHttpInfo (string id, string type = default(string)); #endregion Asynchronous Operations } /// <summary> /// Represents a collection of functions to interact with the API endpoints /// </summary> public partial class TaskIdentityLinkApi : ITaskIdentityLinkApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// <summary> /// Initializes a new instance of the <see cref="TaskIdentityLinkApi"/> class. /// </summary> /// <returns></returns> public TaskIdentityLinkApi(String basePath) { this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; } /// <summary> /// Initializes a new instance of the <see cref="TaskIdentityLinkApi"/> class /// </summary> /// <returns></returns> public TaskIdentityLinkApi() { this.Configuration = Org.OpenAPITools.Client.Configuration.Default; ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; } /// <summary> /// Initializes a new instance of the <see cref="TaskIdentityLinkApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public TaskIdentityLinkApi(Org.OpenAPITools.Client.Configuration configuration = null) { if (configuration == null) // use the default one in Configuration this.Configuration = Org.OpenAPITools.Client.Configuration.Default; else this.Configuration = configuration; ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; } /// <summary> /// Gets the base path of the API client. /// </summary> /// <value>The base path</value> public String GetBasePath() { return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); } /// <summary> /// Sets the base path of the API client. /// </summary> /// <value>The base path</value> [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { // do nothing } /// <summary> /// Gets or sets the configuration object /// </summary> /// <value>An instance of the Configuration</value> public Org.OpenAPITools.Client.Configuration Configuration {get; set;} /// <summary> /// Provides a factory method hook for the creation of exceptions. /// </summary> public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// <summary> /// Gets the default header. /// </summary> /// <returns>Dictionary of HTTP header</returns> [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] public IDictionary<String, String> DefaultHeader() { return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader); } /// <summary> /// Add default header. /// </summary> /// <param name="key">Header field name.</param> /// <param name="value">Header field value.</param> /// <returns></returns> [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] public void AddDefaultHeader(string key, string value) { this.Configuration.AddDefaultHeader(key, value); } /// <summary> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns></returns> public void AddIdentityLink (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { AddIdentityLinkWithHttpInfo(id, identityLinkDto); } /// <summary> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>ApiResponse of Object(void)</returns> public ApiResponse<Object> AddIdentityLinkWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->AddIdentityLink"); var localVarPath = "/task/{id}/identity-links"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (identityLinkDto != null && identityLinkDto.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(identityLinkDto); // http body (model) parameter } else { localVarPostBody = identityLinkDto; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("AddIdentityLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), null); } /// <summary> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task AddIdentityLinkAsync (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { await AddIdentityLinkAsyncWithHttpInfo(id, identityLinkDto); } /// <summary> /// Adds an identity link to a task by id. Can be used to link any user or group to a task and specify a relation. /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to add a link to.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task<ApiResponse<Object>> AddIdentityLinkAsyncWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->AddIdentityLink"); var localVarPath = "/task/{id}/identity-links"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (identityLinkDto != null && identityLinkDto.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(identityLinkDto); // http body (model) parameter } else { localVarPostBody = identityLinkDto; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("AddIdentityLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), null); } /// <summary> /// Removes an identity link from a task by id /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns></returns> public void DeleteIdentityLink (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { DeleteIdentityLinkWithHttpInfo(id, identityLinkDto); } /// <summary> /// Removes an identity link from a task by id /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>ApiResponse of Object(void)</returns> public ApiResponse<Object> DeleteIdentityLinkWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->DeleteIdentityLink"); var localVarPath = "/task/{id}/identity-links/delete"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (identityLinkDto != null && identityLinkDto.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(identityLinkDto); // http body (model) parameter } else { localVarPostBody = identityLinkDto; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteIdentityLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), null); } /// <summary> /// Removes an identity link from a task by id /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task DeleteIdentityLinkAsync (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { await DeleteIdentityLinkAsyncWithHttpInfo(id, identityLinkDto); } /// <summary> /// Removes an identity link from a task by id /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to remove a link from.</param> /// <param name="identityLinkDto"> (optional)</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task<ApiResponse<Object>> DeleteIdentityLinkAsyncWithHttpInfo (string id, IdentityLinkDto identityLinkDto = default(IdentityLinkDto)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->DeleteIdentityLink"); var localVarPath = "/task/{id}/identity-links/delete"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (identityLinkDto != null && identityLinkDto.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(identityLinkDto); // http body (model) parameter } else { localVarPostBody = identityLinkDto; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteIdentityLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), null); } /// <summary> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>List&lt;IdentityLinkDto&gt;</returns> public List<IdentityLinkDto> GetIdentityLinks (string id, string type = default(string)) { ApiResponse<List<IdentityLinkDto>> localVarResponse = GetIdentityLinksWithHttpInfo(id, type); return localVarResponse.Data; } /// <summary> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>ApiResponse of List&lt;IdentityLinkDto&gt;</returns> public ApiResponse<List<IdentityLinkDto>> GetIdentityLinksWithHttpInfo (string id, string type = default(string)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->GetIdentityLinks"); var localVarPath = "/task/{id}/identity-links"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter // make the HTTP request IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetIdentityLinks", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<List<IdentityLinkDto>>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), (List<IdentityLinkDto>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<IdentityLinkDto>))); } /// <summary> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>Task of List&lt;IdentityLinkDto&gt;</returns> public async System.Threading.Tasks.Task<List<IdentityLinkDto>> GetIdentityLinksAsync (string id, string type = default(string)) { ApiResponse<List<IdentityLinkDto>> localVarResponse = await GetIdentityLinksAsyncWithHttpInfo(id, type); return localVarResponse.Data; } /// <summary> /// Gets the identity links for a task by id, which are the users and groups that are in *some* relation to it (including assignee and owner). /// </summary> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id">The id of the task to retrieve the identity links for.</param> /// <param name="type">Filter by the type of links to include. (optional)</param> /// <returns>Task of ApiResponse (List&lt;IdentityLinkDto&gt;)</returns> public async System.Threading.Tasks.Task<ApiResponse<List<IdentityLinkDto>>> GetIdentityLinksAsyncWithHttpInfo (string id, string type = default(string)) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TaskIdentityLinkApi->GetIdentityLinks"); var localVarPath = "/task/{id}/identity-links"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new List<KeyValuePair<String, String>>(); var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary<String, String>(); var localVarFileParams = new Dictionary<String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetIdentityLinks", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<List<IdentityLinkDto>>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), (List<IdentityLinkDto>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<IdentityLinkDto>))); } } }
51.550345
177
0.634933
[ "Apache-2.0" ]
yanavasileva/camunda-bpm-examples
openapi-python-client/src/Org.OpenAPITools/Api/TaskIdentityLinkApi.cs
37,374
C#
using System; using System.Text; using awsiotmqttoverwebsocketswinapp.View; using awsiotmqttoverwebsocketswinapp.Presenter; using awsiotmqttoverwebsocketswinapp.Utils; namespace awsiotmqttoverwebsocketswinapp { public partial class Form : System.Windows.Forms.Form, IAwsIotView { private delegate void AppendSubscribeMessageDelegate(string message); private delegate void UpdateConnectLabelDelegate(string message); private delegate void UpdatePublishLabelDelegate(string message); private readonly StringBuilder subscribeMessage = new StringBuilder(); private readonly AwsIotPresenter presenter; public Form() { InitializeComponent(); Logger.LogInfo("Initialized"); presenter = new AwsIotPresenter(this); } public string HostText { get { return txtIotEndpoint.Text; } set { txtIotEndpoint.Text = value; } } public string RegionText { get { return txtRegion.Text; } set { txtRegion.Text = value; } } public string AccessKeyText { get { return txtAccessKey.Text; } set { txtAccessKey.Text = value; } } public string SecretKeyText { get { return txtSecretKey.Text; } set { txtSecretKey.Text = value; } } public string TopicToPublishText { get { return txtTopicToPublish.Text; } set { txtTopicToPublish.Text = value; } } public string TopicToSubscribeText { get { return txtSubscribeTopic.Text; } set { txtSubscribeTopic.Text = value; } } public string ConnectStatusLabel { get { return lblConnectStatus.Text; } set { if (InvokeRequired) { lblConnectStatus.Invoke(new UpdateConnectLabelDelegate(UpdateConnectLabel), value); } else { lblConnectStatus.Text = value; } } } public string PublishStatusLabel { get { return lblPubStatus.Text; } set { lblPubStatus.Text = value; } } public string SubscribeStatusLabel { get { return lblSubscriptionStatus.Text; } set { lblSubscriptionStatus.Text = value; } } public string PublishMessageText { get { return txtPublishMessage.Text; } set { txtPublishMessage.Text = value; } } public string ReceivedMessageText { get { return txtSubscribeMessage.Text; } set { if (InvokeRequired) { txtSubscribeMessage.Invoke(new AppendSubscribeMessageDelegate(AppendSubscribeMessage), value); } else { txtSubscribeMessage.AppendText(value); } } } private async void btnConnect_Click(object sender, EventArgs e) { await presenter.ConnectToAwsIoT(); } private async void btnPublish_Click(object sender, EventArgs e) { if (presenter.mqttClient == null) { await presenter.ConnectToAwsIoT(); } await presenter.PublishMessage(PublishMessageText, TopicToPublishText); PublishStatusLabel = $"Published to {TopicToPublishText}"; } private async void btnSubscribe_Click(object sender, EventArgs e) { if (presenter.mqttClient == null) { await presenter.ConnectToAwsIoT(); } await presenter.SubscribeTo(TopicToSubscribeText); } private void AppendSubscribeMessage(string message) { subscribeMessage.Append(message); txtSubscribeMessage.AppendText(subscribeMessage.ToString()); } private void UpdateConnectLabel(string message) { lblConnectStatus.Text = message; } } }
23.497696
114
0.46617
[ "Apache-2.0" ]
aws-samples/aws-iot-core-dotnet-app-mqtt-over-websockets-sigv4
Dotnet win app/awsiotmqttoverwebsocketswinapp/awsiotmqttoverwebsocketswinapp/Form.cs
5,101
C#
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System; using System.Collections.Generic; using Aliyun.Acs.Core.Transform; using Aliyun.Acs.Slb.Model.V20140515; namespace Aliyun.Acs.Slb.Transform.V20140515 { public class ListTagResourcesResponseUnmarshaller { public static ListTagResourcesResponse Unmarshall(UnmarshallerContext _ctx) { ListTagResourcesResponse listTagResourcesResponse = new ListTagResourcesResponse(); listTagResourcesResponse.HttpResponse = _ctx.HttpResponse; listTagResourcesResponse.RequestId = _ctx.StringValue("ListTagResources.RequestId"); listTagResourcesResponse.NextToken = _ctx.StringValue("ListTagResources.NextToken"); List<ListTagResourcesResponse.ListTagResources_TagResource> listTagResourcesResponse_tagResources = new List<ListTagResourcesResponse.ListTagResources_TagResource>(); for (int i = 0; i < _ctx.Length("ListTagResources.TagResources.Length"); i++) { ListTagResourcesResponse.ListTagResources_TagResource tagResource = new ListTagResourcesResponse.ListTagResources_TagResource(); tagResource.TagKey = _ctx.StringValue("ListTagResources.TagResources["+ i +"].TagKey"); tagResource.TagValue = _ctx.StringValue("ListTagResources.TagResources["+ i +"].TagValue"); tagResource.ResourceType = _ctx.StringValue("ListTagResources.TagResources["+ i +"].ResourceType"); tagResource.ResourceId = _ctx.StringValue("ListTagResources.TagResources["+ i +"].ResourceId"); listTagResourcesResponse_tagResources.Add(tagResource); } listTagResourcesResponse.TagResources = listTagResourcesResponse_tagResources; return listTagResourcesResponse; } } }
46.509434
170
0.772008
[ "Apache-2.0" ]
AxiosCros/aliyun-openapi-net-sdk
aliyun-net-sdk-slb/Slb/Transform/V20140515/ListTagResourcesResponseUnmarshaller.cs
2,465
C#
/* SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. * * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. * * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Runtime.Serialization; using OpenSearch.Net.Utf8Json; namespace Osc { /// <summary> /// The kuromoji_iteration_mark normalizes Japanese horizontal iteration marks (odoriji) to their expanded form. /// Part of the `analysis-kuromoji` plugin: /// </summary> public interface IKuromojiIterationMarkCharFilter : ICharFilter { [DataMember(Name ="normalize_kana")] [JsonFormatter(typeof(NullableStringBooleanFormatter))] bool? NormalizeKana { get; set; } [DataMember(Name ="normalize_kanji")] [JsonFormatter(typeof(NullableStringBooleanFormatter))] bool? NormalizeKanji { get; set; } } /// <inheritdoc /> public class KuromojiIterationMarkCharFilter : CharFilterBase, IKuromojiIterationMarkCharFilter { public KuromojiIterationMarkCharFilter() : base("kuromoji_iteration_mark") { } /// <inheritdoc /> public bool? NormalizeKana { get; set; } /// <inheritdoc /> public bool? NormalizeKanji { get; set; } } /// <inheritdoc /> public class KuromojiIterationMarkCharFilterDescriptor : CharFilterDescriptorBase<KuromojiIterationMarkCharFilterDescriptor, IKuromojiIterationMarkCharFilter>, IKuromojiIterationMarkCharFilter { protected override string Type => "kuromoji_iteration_mark"; bool? IKuromojiIterationMarkCharFilter.NormalizeKana { get; set; } bool? IKuromojiIterationMarkCharFilter.NormalizeKanji { get; set; } /// <inheritdoc /> public KuromojiIterationMarkCharFilterDescriptor NormalizeKanji(bool? normalize = true) => Assign(normalize, (a, v) => a.NormalizeKanji = v); /// <inheritdoc /> public KuromojiIterationMarkCharFilterDescriptor NormalizeKana(bool? normalize = true) => Assign(normalize, (a, v) => a.NormalizeKana = v); } }
36.194805
139
0.761751
[ "Apache-2.0" ]
Bit-Quill/opensearch-net
src/Osc/Analysis/Plugins/Kuromoji/KuromojiIterationMarkCharFilter.cs
2,787
C#
// Copyright © 2018 Wave Engine S.L. All rights reserved. Use is subject to license terms. #region Using Statements using System; using System.Collections.Generic; using System.Text; using WaveEngine.Common.Media; using WaveEngine.Framework; using WaveEngine.Framework.Services; #endregion namespace WaveEngine.Components.GameActions { /// <summary> /// A game action to continue with other action /// </summary> public class GameActionNode : GameAction { /// <summary> /// Number of instances /// </summary> private static int instances; /// <summary> /// The wrapped Action /// </summary> protected IGameAction wrappedAction; /// <summary> /// The function that generate a game action /// </summary> private Func<IGameAction> actionFunction; #region Properties /// <summary> /// Gets the child tasks. /// </summary> /// <value> /// The child tasks. /// </value> public override IEnumerable<IGameAction> ChildActions { get { yield return this.wrappedAction; } } #endregion #region Initialize /// <summary> /// Initializes a new instance of the <see cref="GameActionNode" /> class. /// </summary> /// <param name="wrappedAction">The wrapped game action</param> /// <param name="scene">The scene.</param> public GameActionNode(IGameAction wrappedAction, Scene scene = null) : base("GameActionNode" + instances++, scene) { this.wrappedAction = wrappedAction; } /// <summary> /// Initializes a new instance of the <see cref="GameActionNode" /> class. /// </summary> /// <param name="actionFunction">The wrapped game action</param> /// <param name="scene">The scene.</param> public GameActionNode(Func<IGameAction> actionFunction, Scene scene = null) : base("GameActionNode" + instances++, scene) { this.actionFunction = actionFunction; } /// <summary> /// Initializes a new instance of the <see cref="GameActionNode" /> class. /// </summary> /// <param name="parent">The parent action.</param> /// <param name="wrappedAction">The wrapped game action</param> public GameActionNode(IGameAction parent, IGameAction wrappedAction) : base(parent, "GameActionNode" + instances++) { this.wrappedAction = wrappedAction; } /// <summary> /// Initializes a new instance of the <see cref="GameActionNode" /> class. /// </summary> /// <param name="parent">The parent action.</param> /// <param name="actionFunction">The wrapped game action</param> public GameActionNode(IGameAction parent, Func<IGameAction> actionFunction) : base(parent, "GameActionNode" + instances++) { this.actionFunction = actionFunction; } #endregion #region Private Methods /// <summary> /// Perform Run actions /// </summary> protected override void PerformRun() { if (this.wrappedAction == null) { this.wrappedAction = this.actionFunction(); if (this.wrappedAction == null) { throw new NullReferenceException("Game action function reurn a null value"); } } this.wrappedAction.Completed += this.WrappedActionCompleted; this.wrappedAction.Cancelled += this.WrappedActionCancelled; if (this.wrappedAction.State != GameActionState.Running) { this.wrappedAction.Run(); } } /// <summary> /// The wrapped action is completed /// </summary> /// <param name="action">The action</param> private void WrappedActionCompleted(IGameAction action) { action.Completed -= this.WrappedActionCompleted; this.PerformCompleted(); } /// <summary> /// The wrapped action is cancelled /// </summary> /// <param name="action">The action</param> private void WrappedActionCancelled(IGameAction action) { action.Cancelled -= this.WrappedActionCancelled; if (this.State == GameActionState.Running || this.State == GameActionState.Waiting) { this.PerformCancel(); } } /// <summary> /// Perform the game action cancelation /// </summary> protected override void PerformCancel() { if (this.State == GameActionState.Running) { this.wrappedAction.Cancelled -= this.WrappedActionCancelled; this.wrappedAction.Cancel(); } base.PerformCancel(); } /// <summary> /// Skip the action /// </summary> /// <returns>A value indicating it the game action is susscessfully skipped</returns> protected override bool PerformSkip() { if (this.IsSkippable) { this.Cancel(); return base.PerformSkip(); } else { return this.wrappedAction.TrySkip(); } } /// <summary> /// Returns a <see cref="string" /> that represents this instance. /// </summary> /// <returns> /// A <see cref="string" /> that represents this instance. /// </returns> public override string ToString() { return "[" + base.ToString() + " -> " + this.wrappedAction.ToString() + "]"; } #endregion } }
31.125
96
0.545515
[ "MIT" ]
WaveEngine/Components
Shared/GameActions/GameActionNode.cs
5,979
C#
namespace ONI_Common.Reflection { using Mono.Cecil; using System.Linq; public static class CecilHelper { public static FieldDefinition GetFieldDefinition(ModuleDefinition module, string typeName, string fieldName) { TypeDefinition type = GetTypeDefinition(module, typeName); return GetFieldDefinition(type, fieldName); } public static FieldDefinition GetFieldDefinition(TypeDefinition type, string fieldName) { return type.Fields.First(field => field.Name == fieldName); } public static MethodDefinition GetMethodDefinition( ModuleDefinition module, string typeName, string methodName, bool useFullName = false) { TypeDefinition type = GetTypeDefinition(module, typeName, useFullName); return GetMethodDefinition(module, type, methodName); } public static MethodDefinition GetMethodDefinition( ModuleDefinition module, TypeDefinition type, string methodName) { return type.Methods.First(method => method.Name == methodName); } public static MethodReference GetMethodReference(ModuleDefinition targetModule, MethodDefinition method) { return targetModule.ImportReference(method); } public static ModuleDefinition GetModule(string moduleName, string directoryPath) { ReaderParameters parameters = new ReaderParameters(); DefaultAssemblyResolver assemblyResolver = new DefaultAssemblyResolver(); assemblyResolver.AddSearchDirectory(directoryPath); parameters.AssemblyResolver = assemblyResolver; return ModuleDefinition.ReadModule(moduleName, parameters); } public static TypeDefinition GetTypeDefinition( ModuleDefinition module, string typeName, bool useFullName = false) { return module.Types.First(type => useFullName ? type.FullName == typeName : type.Name == typeName); } } }
34.809524
116
0.635659
[ "MIT" ]
Blindfold-Games/ONI-Modloader-Mods
Source/ONI-Common/Reflection/CecilHelper.cs
2,195
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // HashLookup.cs // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { /// <summary> /// A simple hash map data structure, derived from the LINQ set we also use. /// </summary> /// <typeparam name="TKey">The kind of keys contained within.</typeparam> /// <typeparam name="TValue">The kind of values contained within.</typeparam> internal class HashLookup<TKey, TValue> { private int[] buckets; private Slot[] slots; private int count; private int freeList; private IEqualityComparer<TKey> comparer; private const int HashCodeMask = 0x7fffffff; internal HashLookup() : this(null) { } internal HashLookup(IEqualityComparer<TKey> comparer) { this.comparer = comparer; buckets = new int[7]; slots = new Slot[7]; freeList = -1; } // If value is not in set, add it and return true; otherwise return false internal bool Add(TKey key, TValue value) { return !Find(key, true, false, ref value); } // Check whether value is in set internal bool TryGetValue(TKey key, ref TValue value) { return Find(key, false, false, ref value); } internal TValue this[TKey key] { set { TValue v = value; Find(key, false, true, ref v); } } private int GetKeyHashCode(TKey key) { return HashCodeMask & (comparer == null ? (key == null ? 0 : key.GetHashCode()) : comparer.GetHashCode(key)); } private bool AreKeysEqual(TKey key1, TKey key2) { return (comparer == null ? ((key1 == null && key2 == null) || (key1 != null && key1.Equals(key2))) : comparer.Equals(key1, key2)); } // If value is in set, remove it and return true; otherwise return false internal bool Remove(TKey key) { int hashCode = GetKeyHashCode(key); int bucket = hashCode % buckets.Length; int last = -1; for (int i = buckets[bucket] - 1; i >= 0; last = i, i = slots[i].next) { if (slots[i].hashCode == hashCode && AreKeysEqual(slots[i].key, key)) { if (last < 0) { buckets[bucket] = slots[i].next + 1; } else { slots[last].next = slots[i].next; } slots[i].hashCode = -1; slots[i].key = default(TKey); slots[i].value = default(TValue); slots[i].next = freeList; freeList = i; return true; } } return false; } private bool Find(TKey key, bool add, bool set, ref TValue value) { int hashCode = GetKeyHashCode(key); for (int i = buckets[hashCode % buckets.Length] - 1; i >= 0; i = slots[i].next) { if (slots[i].hashCode == hashCode && AreKeysEqual(slots[i].key, key)) { if (set) { slots[i].value = value; return true; } else { value = slots[i].value; return true; } } } if (add) { int index; if (freeList >= 0) { index = freeList; freeList = slots[index].next; } else { if (count == slots.Length) Resize(); index = count; count++; } int bucket = hashCode % buckets.Length; slots[index].hashCode = hashCode; slots[index].key = key; slots[index].value = value; slots[index].next = buckets[bucket] - 1; buckets[bucket] = index + 1; } return false; } void Resize() { int newSize = checked(count * 2 + 1); int[] newBuckets = new int[newSize]; Slot[] newSlots = new Slot[newSize]; Array.Copy(slots, 0, newSlots, 0, count); for (int i = 0; i < count; i++) { int bucket = newSlots[i].hashCode % newSize; newSlots[i].next = newBuckets[bucket] - 1; newBuckets[bucket] = i + 1; } buckets = newBuckets; slots = newSlots; } internal int Count { get { return count; } } internal KeyValuePair<TKey, TValue> this[int index] { get { return new KeyValuePair<TKey, TValue>(slots[index].key, slots[index].value); } } internal struct Slot { internal int hashCode; internal int next; internal TKey key; internal TValue value; } } }
30.936842
96
0.434502
[ "MIT" ]
Aevitas/corefx
src/System.Linq.Parallel/src/System/Linq/Parallel/Utils/HashLookup.cs
5,878
C#
using System.Resources; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("LiteDB.Shell")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LiteDB.Shell")] [assembly: AssemblyCopyright("MIT © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("01ce385b-31a7-4b1a-9487-23fe8acb3888")] [assembly: AssemblyVersion("3.1.4.0")] [assembly: AssemblyFileVersion("3.1.4.0")] [assembly: NeutralResourcesLanguage("en")]
31.842105
56
0.757025
[ "MIT" ]
RytisLT/LiteDB
LiteDB.Shell/Properties/AssemblyInfo.cs
608
C#
// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.ScenarioTest.SqlTests; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; using Xunit.Abstractions; using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests { public class ThreatDetectionClassicStorageTests : SqlTestsBase { protected override void SetupManagementClients(RestTestFramework.MockContext context) { var sqlClient = GetSqlClient(context); var publicstorageV2Client = GetPublicStorageManagementClient(context); var storageV2Client = GetStorageManagementClient(context); var newResourcesClient = GetResourcesClient(context); Helper.SetupSomeOfManagementClients(sqlClient, publicstorageV2Client, storageV2Client, newResourcesClient); } public ThreatDetectionClassicStorageTests(ITestOutputHelper output) : base(output) { } // Commenting out the test until a fix will be added // [Fact] // [Trait(Category.AcceptanceType, Category.CheckIn)] // See issue https://github.com/Azure/azure-powershell/issues/6601 public void ThreatDetectionUpdatePolicyWithClassicStorage() { RunPowerShellTest("Test-ThreatDetectionUpdatePolicyWithClassicStorage"); } } }
45.270833
120
0.663599
[ "MIT" ]
faroukfriha/azure-powershell
src/Sql/Sql.Test/ScenarioTests/ThreatDetectionClassicStorageTests.cs
2,126
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using MyNoSqlServer.Abstractions; using Service.InterestManager.Postrges; using Service.IntrestManager.Domain; using Service.IntrestManager.Domain.Models; using Service.IntrestManager.Domain.Models.NoSql; namespace Service.IntrestManager.Api.Storage { public class InterestRateSettingsStorage : IInterestRateSettingsStorage { private readonly ILogger<InterestRateSettingsStorage> _logger; private readonly IMyNoSqlServerDataWriter<InterestRateSettingsNoSql> _interestRateWriter; private readonly DatabaseContextFactory _contextFactory; private readonly IInterestRateByWalletGenerator _interestRateByWalletGenerator; public InterestRateSettingsStorage(IMyNoSqlServerDataWriter<InterestRateSettingsNoSql> interestRateWriter, DatabaseContextFactory contextFactory, ILogger<InterestRateSettingsStorage> logger, IInterestRateByWalletGenerator interestRateByWalletGenerator) { _interestRateWriter = interestRateWriter; _contextFactory = contextFactory; _logger = logger; _interestRateByWalletGenerator = interestRateByWalletGenerator; } public async Task SyncSettings() { await using var ctx = _contextFactory.Create(); var settings = ctx.GetSettings(); var noSqlSettings = settings.Select(InterestRateSettingsNoSql.Create).ToList(); await _interestRateWriter.CleanAndKeepMaxPartitions(0); await _interestRateWriter.BulkInsertOrReplaceAsync(noSqlSettings); await _interestRateByWalletGenerator.ClearRates(); } public async Task<List<InterestRateSettings>> GetSettings() { try { await using var ctx = _contextFactory.Create(); return ctx.GetSettings(); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return new List<InterestRateSettings>(); } } public async Task<string> UpsertSettings(InterestRateSettings settings) { try { if (string.IsNullOrWhiteSpace(settings.Asset) && string.IsNullOrWhiteSpace(settings.WalletId)) { return "Wallet and asset cannot be empty."; } if (string.IsNullOrWhiteSpace(settings.Asset)) { settings.RangeFrom = 0; settings.RangeTo = 0; settings.Asset = string.Empty; } if (string.IsNullOrWhiteSpace(settings.WalletId)) { settings.WalletId = string.Empty; } await using var ctx = _contextFactory.Create(); var dbSettingsCollection = ctx.GetSettings(); var validateResult = settings.Id == 0 ? await GetValidateResult(settings, dbSettingsCollection) : SettingsValidationResultEnum.Ok; switch (validateResult) { case SettingsValidationResultEnum.Ok: { await ctx.UpsertSettings(settings); await SyncSettings(); return string.Empty; } case SettingsValidationResultEnum.CrossedRangeError: return "CrossedRangeError"; case SettingsValidationResultEnum.DoubleWalletSettingsError: return "DoubleWalletSettingsError"; default: return "Smth wrong in InterestRateSettingsStorage.UpsertSettings"; } } catch (Exception ex) { _logger.LogError(ex, ex.Message); return ex.Message; } } public async Task<List<SettingsValidationResult>> UpsertSettingsList(List<InterestRateSettings> settingsList) { var validationResult = new List<SettingsValidationResult>(); await using var ctx = _contextFactory.Create(); var dbSettingsCollection = ctx.GetSettings(); var dbSettingsCollectionCopy = dbSettingsCollection.Select(InterestRateSettings.GetCopy).ToList(); foreach (var settings in settingsList) { if (string.IsNullOrWhiteSpace(settings.Asset) && string.IsNullOrWhiteSpace(settings.WalletId)) { validationResult.Add(new SettingsValidationResult() { InterestRateSettings = settings, ValidationResult = SettingsValidationResultEnum.WalletAndAssetCannotBeEmpty }); continue; } if (string.IsNullOrWhiteSpace(settings.Asset)) { settings.RangeFrom = 0; settings.RangeTo = 0; settings.Asset = string.Empty; } if (string.IsNullOrWhiteSpace(settings.WalletId)) { settings.WalletId = string.Empty; } var validationEntity = new SettingsValidationResult() { InterestRateSettings = settings, ValidationResult = await GetValidateResult(settings, dbSettingsCollectionCopy) }; validationResult.Add(validationEntity); dbSettingsCollectionCopy.Add(settings); } if (validationResult.All(e => e.ValidationResult == SettingsValidationResultEnum.Ok)) { await ctx.UpsertSettingsList(settingsList); await SyncSettings(); } return validationResult; } private async Task<SettingsValidationResultEnum> GetValidateResult(InterestRateSettings settings, IReadOnlyCollection<InterestRateSettings> settingsCollection) { if (!string.IsNullOrWhiteSpace(settings.Asset) && !string.IsNullOrWhiteSpace(settings.WalletId)) { var settingsWithWalletAndAsset = settingsCollection .Where(e => e.Asset == settings.Asset && e.WalletId == settings.WalletId && (e.Id != settings.Id || e.Id == 0)) .ToList(); if (settingsWithWalletAndAsset.Any()) { var settingsInRange = settingsWithWalletAndAsset .Where(e => (settings.RangeFrom > e.RangeFrom && settings.RangeFrom < e.RangeTo) || (settings.RangeTo > e.RangeFrom && settings.RangeTo < e.RangeTo) || (settings.RangeFrom < e.RangeFrom && settings.RangeTo > e.RangeTo)); if (settingsInRange.Any()) { return SettingsValidationResultEnum.CrossedRangeError; } } } if (string.IsNullOrWhiteSpace(settings.Asset)) { var clone = settingsCollection .FirstOrDefault(e => e.WalletId == settings.WalletId && (string.IsNullOrWhiteSpace(e.Asset) || e.Asset == null) && (e.Id != settings.Id || e.Id == 0)); if (clone != null) { return SettingsValidationResultEnum.DoubleWalletSettingsError; } } if (string.IsNullOrWhiteSpace(settings.WalletId)) { var settingsWithAsset = settingsCollection .Where(e => e.Asset == settings.Asset && (string.IsNullOrWhiteSpace(e.WalletId) || e.WalletId == null) && (e.Id != settings.Id || e.Id == 0)) .ToList(); if (settingsWithAsset.Any()) { var settingsInRange = settingsWithAsset .Where(e => (settings.RangeFrom > e.RangeFrom && settings.RangeFrom < e.RangeTo) || (settings.RangeTo > e.RangeFrom && settings.RangeTo < e.RangeTo) || (settings.RangeFrom < e.RangeFrom && settings.RangeTo > e.RangeTo)); if (settingsInRange.Any()) { return SettingsValidationResultEnum.CrossedRangeError; } } } return SettingsValidationResultEnum.Ok; } public async Task RemoveSettings(InterestRateSettings settings) { try { await using var ctx = _contextFactory.Create(); await ctx.RemoveSettings(settings); await SyncSettings(); } catch (Exception ex) { _logger.LogError(ex, ex.Message); } } } }
42.535398
117
0.531884
[ "MIT" ]
MyJetWallet/Service.IntrestManager
src/Service.IntrestManager.Api/Storage/InterestRateSettingsStorage.cs
9,613
C#
// Copyright (c) 2014-2017 Wolfgang Borgsmüller // All rights reserved. // // This software may be modified and distributed under the terms // of the BSD license. See the License.txt file for details. // Generated file. Do not edit. using System; namespace Chromium.Remote { using Event; /// <summary> /// Implement this structure to handle events related to browser load status. The /// functions of this structure will be called on the browser process UI thread /// or render process main thread (TID_RENDERER). /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public class CfrLoadHandler : CfrBaseClient { private CfrLoadHandler(RemotePtr remotePtr) : base(remotePtr) {} public CfrLoadHandler() : base(new CfxLoadHandlerCtorWithGCHandleRemoteCall()) { lock(RemotePtr.connection.weakCache) { RemotePtr.connection.weakCache.Add(RemotePtr.ptr, this); } } /// <summary> /// Called when the loading state has changed. This callback will be executed /// twice -- once when loading is initiated either programmatically or by user /// action, and once when loading is terminated due to completion, cancellation /// of failure. It will be called before any calls to OnLoadStart and after all /// calls to OnLoadError and/or OnLoadEnd. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public event CfrOnLoadingStateChangeEventHandler OnLoadingStateChange { add { if(m_OnLoadingStateChange == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 0; call.active = true; call.RequestExecution(RemotePtr.connection); } m_OnLoadingStateChange += value; } remove { m_OnLoadingStateChange -= value; if(m_OnLoadingStateChange == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 0; call.active = false; call.RequestExecution(RemotePtr.connection); } } } internal CfrOnLoadingStateChangeEventHandler m_OnLoadingStateChange; /// <summary> /// Called after a navigation has been committed and before the browser begins /// loading contents in the frame. The |Frame| value will never be NULL -- call /// the is_main() function to check if this frame is the main frame. /// |TransitionType| provides information about the source of the navigation /// and an accurate value is only available in the browser process. Multiple /// frames may be loading at the same time. Sub-frames may start or continue /// loading after the main frame load has ended. This function will not be /// called for same page navigations (fragments, history state, etc.) or for /// navigations that fail or are canceled before commit. For notification of /// overall browser load status use OnLoadingStateChange instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public event CfrOnLoadStartEventHandler OnLoadStart { add { if(m_OnLoadStart == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 1; call.active = true; call.RequestExecution(RemotePtr.connection); } m_OnLoadStart += value; } remove { m_OnLoadStart -= value; if(m_OnLoadStart == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 1; call.active = false; call.RequestExecution(RemotePtr.connection); } } } internal CfrOnLoadStartEventHandler m_OnLoadStart; /// <summary> /// Called when the browser is done loading a frame. The |Frame| value will /// never be NULL -- call the is_main() function to check if this frame is the /// main frame. Multiple frames may be loading at the same time. Sub-frames may /// start or continue loading after the main frame load has ended. This /// function will not be called for same page navigations (fragments, history /// state, etc.) or for navigations that fail or are canceled before commit. /// For notification of overall browser load status use OnLoadingStateChange /// instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public event CfrOnLoadEndEventHandler OnLoadEnd { add { if(m_OnLoadEnd == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 2; call.active = true; call.RequestExecution(RemotePtr.connection); } m_OnLoadEnd += value; } remove { m_OnLoadEnd -= value; if(m_OnLoadEnd == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 2; call.active = false; call.RequestExecution(RemotePtr.connection); } } } internal CfrOnLoadEndEventHandler m_OnLoadEnd; /// <summary> /// Called when a navigation fails or is canceled. This function may be called /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if /// after commit. |ErrorCode| is the error code number, |ErrorText| is the /// error text and |FailedUrl| is the URL that failed to load. See /// net\base\net_error_list.h for complete descriptions of the error codes. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public event CfrOnLoadErrorEventHandler OnLoadError { add { if(m_OnLoadError == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 3; call.active = true; call.RequestExecution(RemotePtr.connection); } m_OnLoadError += value; } remove { m_OnLoadError -= value; if(m_OnLoadError == null) { var call = new CfxLoadHandlerSetCallbackRemoteCall(); call.self = RemotePtr.ptr; call.index = 3; call.active = false; call.RequestExecution(RemotePtr.connection); } } } internal CfrOnLoadErrorEventHandler m_OnLoadError; } namespace Event { /// <summary> /// Called when the loading state has changed. This callback will be executed /// twice -- once when loading is initiated either programmatically or by user /// action, and once when loading is terminated due to completion, cancellation /// of failure. It will be called before any calls to OnLoadStart and after all /// calls to OnLoadError and/or OnLoadEnd. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public delegate void CfrOnLoadingStateChangeEventHandler(object sender, CfrOnLoadingStateChangeEventArgs e); /// <summary> /// Called when the loading state has changed. This callback will be executed /// twice -- once when loading is initiated either programmatically or by user /// action, and once when loading is terminated due to completion, cancellation /// of failure. It will be called before any calls to OnLoadStart and after all /// calls to OnLoadError and/or OnLoadEnd. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public class CfrOnLoadingStateChangeEventArgs : CfrEventArgs { private CfxLoadHandlerOnLoadingStateChangeRemoteEventCall call; internal CfrBrowser m_browser_wrapped; internal CfrOnLoadingStateChangeEventArgs(CfxLoadHandlerOnLoadingStateChangeRemoteEventCall call) { this.call = call; } /// <summary> /// Get the Browser parameter for the <see cref="CfrLoadHandler.OnLoadingStateChange"/> render process callback. /// </summary> public CfrBrowser Browser { get { CheckAccess(); if(m_browser_wrapped == null) m_browser_wrapped = CfrBrowser.Wrap(new RemotePtr(connection, call.browser)); return m_browser_wrapped; } } /// <summary> /// Get the IsLoading parameter for the <see cref="CfrLoadHandler.OnLoadingStateChange"/> render process callback. /// </summary> public bool IsLoading { get { CheckAccess(); return 0 != call.isLoading; } } /// <summary> /// Get the CanGoBack parameter for the <see cref="CfrLoadHandler.OnLoadingStateChange"/> render process callback. /// </summary> public bool CanGoBack { get { CheckAccess(); return 0 != call.canGoBack; } } /// <summary> /// Get the CanGoForward parameter for the <see cref="CfrLoadHandler.OnLoadingStateChange"/> render process callback. /// </summary> public bool CanGoForward { get { CheckAccess(); return 0 != call.canGoForward; } } public override string ToString() { return String.Format("Browser={{{0}}}, IsLoading={{{1}}}, CanGoBack={{{2}}}, CanGoForward={{{3}}}", Browser, IsLoading, CanGoBack, CanGoForward); } } /// <summary> /// Called after a navigation has been committed and before the browser begins /// loading contents in the frame. The |Frame| value will never be NULL -- call /// the is_main() function to check if this frame is the main frame. /// |TransitionType| provides information about the source of the navigation /// and an accurate value is only available in the browser process. Multiple /// frames may be loading at the same time. Sub-frames may start or continue /// loading after the main frame load has ended. This function will not be /// called for same page navigations (fragments, history state, etc.) or for /// navigations that fail or are canceled before commit. For notification of /// overall browser load status use OnLoadingStateChange instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public delegate void CfrOnLoadStartEventHandler(object sender, CfrOnLoadStartEventArgs e); /// <summary> /// Called after a navigation has been committed and before the browser begins /// loading contents in the frame. The |Frame| value will never be NULL -- call /// the is_main() function to check if this frame is the main frame. /// |TransitionType| provides information about the source of the navigation /// and an accurate value is only available in the browser process. Multiple /// frames may be loading at the same time. Sub-frames may start or continue /// loading after the main frame load has ended. This function will not be /// called for same page navigations (fragments, history state, etc.) or for /// navigations that fail or are canceled before commit. For notification of /// overall browser load status use OnLoadingStateChange instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public class CfrOnLoadStartEventArgs : CfrEventArgs { private CfxLoadHandlerOnLoadStartRemoteEventCall call; internal CfrBrowser m_browser_wrapped; internal CfrFrame m_frame_wrapped; internal CfrOnLoadStartEventArgs(CfxLoadHandlerOnLoadStartRemoteEventCall call) { this.call = call; } /// <summary> /// Get the Browser parameter for the <see cref="CfrLoadHandler.OnLoadStart"/> render process callback. /// </summary> public CfrBrowser Browser { get { CheckAccess(); if(m_browser_wrapped == null) m_browser_wrapped = CfrBrowser.Wrap(new RemotePtr(connection, call.browser)); return m_browser_wrapped; } } /// <summary> /// Get the Frame parameter for the <see cref="CfrLoadHandler.OnLoadStart"/> render process callback. /// </summary> public CfrFrame Frame { get { CheckAccess(); if(m_frame_wrapped == null) m_frame_wrapped = CfrFrame.Wrap(new RemotePtr(connection, call.frame)); return m_frame_wrapped; } } /// <summary> /// Get the TransitionType parameter for the <see cref="CfrLoadHandler.OnLoadStart"/> render process callback. /// </summary> public CfxTransitionType TransitionType { get { CheckAccess(); return (CfxTransitionType)call.transition_type; } } public override string ToString() { return String.Format("Browser={{{0}}}, Frame={{{1}}}, TransitionType={{{2}}}", Browser, Frame, TransitionType); } } /// <summary> /// Called when the browser is done loading a frame. The |Frame| value will /// never be NULL -- call the is_main() function to check if this frame is the /// main frame. Multiple frames may be loading at the same time. Sub-frames may /// start or continue loading after the main frame load has ended. This /// function will not be called for same page navigations (fragments, history /// state, etc.) or for navigations that fail or are canceled before commit. /// For notification of overall browser load status use OnLoadingStateChange /// instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public delegate void CfrOnLoadEndEventHandler(object sender, CfrOnLoadEndEventArgs e); /// <summary> /// Called when the browser is done loading a frame. The |Frame| value will /// never be NULL -- call the is_main() function to check if this frame is the /// main frame. Multiple frames may be loading at the same time. Sub-frames may /// start or continue loading after the main frame load has ended. This /// function will not be called for same page navigations (fragments, history /// state, etc.) or for navigations that fail or are canceled before commit. /// For notification of overall browser load status use OnLoadingStateChange /// instead. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public class CfrOnLoadEndEventArgs : CfrEventArgs { private CfxLoadHandlerOnLoadEndRemoteEventCall call; internal CfrBrowser m_browser_wrapped; internal CfrFrame m_frame_wrapped; internal CfrOnLoadEndEventArgs(CfxLoadHandlerOnLoadEndRemoteEventCall call) { this.call = call; } /// <summary> /// Get the Browser parameter for the <see cref="CfrLoadHandler.OnLoadEnd"/> render process callback. /// </summary> public CfrBrowser Browser { get { CheckAccess(); if(m_browser_wrapped == null) m_browser_wrapped = CfrBrowser.Wrap(new RemotePtr(connection, call.browser)); return m_browser_wrapped; } } /// <summary> /// Get the Frame parameter for the <see cref="CfrLoadHandler.OnLoadEnd"/> render process callback. /// </summary> public CfrFrame Frame { get { CheckAccess(); if(m_frame_wrapped == null) m_frame_wrapped = CfrFrame.Wrap(new RemotePtr(connection, call.frame)); return m_frame_wrapped; } } /// <summary> /// Get the HttpStatusCode parameter for the <see cref="CfrLoadHandler.OnLoadEnd"/> render process callback. /// </summary> public int HttpStatusCode { get { CheckAccess(); return call.httpStatusCode; } } public override string ToString() { return String.Format("Browser={{{0}}}, Frame={{{1}}}, HttpStatusCode={{{2}}}", Browser, Frame, HttpStatusCode); } } /// <summary> /// Called when a navigation fails or is canceled. This function may be called /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if /// after commit. |ErrorCode| is the error code number, |ErrorText| is the /// error text and |FailedUrl| is the URL that failed to load. See /// net\base\net_error_list.h for complete descriptions of the error codes. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public delegate void CfrOnLoadErrorEventHandler(object sender, CfrOnLoadErrorEventArgs e); /// <summary> /// Called when a navigation fails or is canceled. This function may be called /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if /// after commit. |ErrorCode| is the error code number, |ErrorText| is the /// error text and |FailedUrl| is the URL that failed to load. See /// net\base\net_error_list.h for complete descriptions of the error codes. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_load_handler_capi.h">cef/include/capi/cef_load_handler_capi.h</see>. /// </remarks> public class CfrOnLoadErrorEventArgs : CfrEventArgs { private CfxLoadHandlerOnLoadErrorRemoteEventCall call; internal CfrBrowser m_browser_wrapped; internal CfrFrame m_frame_wrapped; internal string m_errorText; internal bool m_errorText_fetched; internal string m_failedUrl; internal bool m_failedUrl_fetched; internal CfrOnLoadErrorEventArgs(CfxLoadHandlerOnLoadErrorRemoteEventCall call) { this.call = call; } /// <summary> /// Get the Browser parameter for the <see cref="CfrLoadHandler.OnLoadError"/> render process callback. /// </summary> public CfrBrowser Browser { get { CheckAccess(); if(m_browser_wrapped == null) m_browser_wrapped = CfrBrowser.Wrap(new RemotePtr(connection, call.browser)); return m_browser_wrapped; } } /// <summary> /// Get the Frame parameter for the <see cref="CfrLoadHandler.OnLoadError"/> render process callback. /// </summary> public CfrFrame Frame { get { CheckAccess(); if(m_frame_wrapped == null) m_frame_wrapped = CfrFrame.Wrap(new RemotePtr(connection, call.frame)); return m_frame_wrapped; } } /// <summary> /// Get the ErrorCode parameter for the <see cref="CfrLoadHandler.OnLoadError"/> render process callback. /// </summary> public CfxErrorCode ErrorCode { get { CheckAccess(); return (CfxErrorCode)call.errorCode; } } /// <summary> /// Get the ErrorText parameter for the <see cref="CfrLoadHandler.OnLoadError"/> render process callback. /// </summary> public string ErrorText { get { CheckAccess(); if(!m_errorText_fetched) { m_errorText = call.errorText_str == IntPtr.Zero ? null : (call.errorText_length == 0 ? String.Empty : CfrRuntime.Marshal.PtrToStringUni(new RemotePtr(connection, call.errorText_str), call.errorText_length)); m_errorText_fetched = true; } return m_errorText; } } /// <summary> /// Get the FailedUrl parameter for the <see cref="CfrLoadHandler.OnLoadError"/> render process callback. /// </summary> public string FailedUrl { get { CheckAccess(); if(!m_failedUrl_fetched) { m_failedUrl = call.failedUrl_str == IntPtr.Zero ? null : (call.failedUrl_length == 0 ? String.Empty : CfrRuntime.Marshal.PtrToStringUni(new RemotePtr(connection, call.failedUrl_str), call.failedUrl_length)); m_failedUrl_fetched = true; } return m_failedUrl; } } public override string ToString() { return String.Format("Browser={{{0}}}, Frame={{{1}}}, ErrorCode={{{2}}}, ErrorText={{{3}}}, FailedUrl={{{4}}}", Browser, Frame, ErrorCode, ErrorText, FailedUrl); } } } }
48.284069
231
0.58976
[ "MIT" ]
0XC8/NanUI
NetDimension.NanUI/ChromiumFX/Generated/Remote/CfrLoadHandler.cs
25,157
C#
#region Copyright(c) Alexey Sadomov, Vladimir Timashkov. All Rights Reserved. // ----------------------------------------------------------------------------- // Copyright(c) 2010 Alexey Sadomov, Vladimir Timashkov. All Rights Reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. No Trademark License - Microsoft Public License (Ms-PL) does not grant you rights to use // authors names, logos, or trademarks. // 2. If you distribute any portion of the software, you must retain all copyright, // patent, trademark, and attribution notices that are present in the software. // 3. If you distribute any portion of the software in source code form, you may do // so only under this license by including a complete copy of Microsoft Public License (Ms-PL) // with your distribution. If you distribute any portion of the software in compiled // or object code form, you may only do so under a license that complies with // Microsoft Public License (Ms-PL). // 4. The names of the authors may not be used to endorse or promote products // derived from this software without specific prior written permission. // // The software is licensed "as-is." You bear the risk of using it. The authors // give no express warranties, guarantees or conditions. You may have additional consumer // rights under your local laws which this license cannot change. To the extent permitted // under your local laws, the authors exclude the implied warranties of merchantability, // fitness for a particular purpose and non-infringement. // ----------------------------------------------------------------------------- #endregion using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; namespace CamlexNET { internal static class Tags { public const string Query = "Query"; public const string Where = "Where"; public const string OrderBy = "OrderBy"; public const string GroupBy = "GroupBy"; public const string FieldRef = "FieldRef"; public const string Value = "Value"; public const string And = "And"; public const string Or = "Or"; public const string Eq = "Eq"; public const string Neq = "Neq"; public const string Geq = "Geq"; public const string Gt = "Gt"; public const string Leq = "Leq"; public const string Lt = "Lt"; public const string IsNotNull = "IsNotNull"; public const string IsNull = "IsNull"; public const string BeginsWith = "BeginsWith"; public const string Contains = "Contains"; public const string Includes = "Includes"; public const string NotIncludes = "NotIncludes"; public const string DateRangesOverlap = "DateRangesOverlap"; public const string ViewFields = "ViewFields"; public const string UserID = "UserID"; public const string In = "In"; public const string Values = "Values"; public const string Joins = "Joins"; public const string Join = "Join"; public const string ProjectedFields = "ProjectedFields"; public const string Field = "Field"; public const string Membership = "Membership"; } }
49.855072
100
0.647093
[ "MIT" ]
sadomovalex/camlex
Camlex.NET/Tags.cs
3,442
C#
using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace PartsUnlimited.Data.Migrations { [DbContext(typeof(PartsUnlimitedContext))] [Migration("20151222030342_InitialMigration")] partial class InitialMigration { protected override void BuildTargetModel(ModelBuilder modelBuilder) { modelBuilder .HasAnnotation("ProductVersion", "7.0.0-rc1-16348") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => { b.Property<string>("Id"); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken(); b.Property<string>("Name") .HasAnnotation("MaxLength", 256); b.Property<string>("NormalizedName") .HasAnnotation("MaxLength", 256); b.HasKey("Id"); b.HasIndex("NormalizedName") .HasAnnotation("Relational:Name", "RoleNameIndex"); b.HasAnnotation("Relational:TableName", "AspNetRoles"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("ClaimType"); b.Property<string>("ClaimValue"); b.Property<string>("RoleId") .IsRequired(); b.HasKey("Id"); b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("ClaimType"); b.Property<string>("ClaimValue"); b.Property<string>("UserId") .IsRequired(); b.HasKey("Id"); b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b => { b.Property<string>("LoginProvider"); b.Property<string>("ProviderKey"); b.Property<string>("ProviderDisplayName"); b.Property<string>("UserId") .IsRequired(); b.HasKey("LoginProvider", "ProviderKey"); b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b => { b.Property<string>("UserId"); b.Property<string>("RoleId"); b.HasKey("UserId", "RoleId"); b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); }); modelBuilder.Entity("PartsUnlimited.Models.ApplicationUser", b => { b.Property<string>("Id"); b.Property<int>("AccessFailedCount"); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken(); b.Property<string>("Email") .HasAnnotation("MaxLength", 256); b.Property<bool>("EmailConfirmed"); b.Property<bool>("LockoutEnabled"); b.Property<DateTimeOffset?>("LockoutEnd"); b.Property<string>("Name"); b.Property<string>("NormalizedEmail") .HasAnnotation("MaxLength", 256); b.Property<string>("NormalizedUserName") .HasAnnotation("MaxLength", 256); b.Property<string>("PasswordHash"); b.Property<string>("PhoneNumber"); b.Property<bool>("PhoneNumberConfirmed"); b.Property<string>("SecurityStamp"); b.Property<bool>("TwoFactorEnabled"); b.Property<string>("UserName") .HasAnnotation("MaxLength", 256); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasAnnotation("Relational:Name", "EmailIndex"); b.HasIndex("NormalizedUserName") .HasAnnotation("Relational:Name", "UserNameIndex"); b.HasAnnotation("Relational:TableName", "AspNetUsers"); }); modelBuilder.Entity("PartsUnlimited.Models.CartItem", b => { b.Property<int>("CartItemId") .ValueGeneratedOnAdd(); b.Property<string>("CartId") .IsRequired(); b.Property<int>("Count"); b.Property<DateTime>("DateCreated"); b.Property<int>("ProductId"); b.HasKey("CartItemId"); }); modelBuilder.Entity("PartsUnlimited.Models.Category", b => { b.Property<int>("CategoryId") .ValueGeneratedOnAdd(); b.Property<string>("Description"); b.Property<string>("ImageUrl"); b.Property<string>("Name") .IsRequired(); b.HasKey("CategoryId"); }); modelBuilder.Entity("PartsUnlimited.Models.Order", b => { b.Property<int>("OrderId") .ValueGeneratedOnAdd(); b.Property<string>("Address") .IsRequired() .HasAnnotation("MaxLength", 70); b.Property<string>("City") .IsRequired() .HasAnnotation("MaxLength", 40); b.Property<string>("Country") .IsRequired() .HasAnnotation("MaxLength", 40); b.Property<string>("Email") .IsRequired(); b.Property<string>("Name") .IsRequired() .HasAnnotation("MaxLength", 160); b.Property<DateTime>("OrderDate"); b.Property<string>("Phone") .IsRequired() .HasAnnotation("MaxLength", 24); b.Property<string>("PostalCode") .IsRequired() .HasAnnotation("MaxLength", 10); b.Property<bool>("Processed"); b.Property<string>("State") .IsRequired() .HasAnnotation("MaxLength", 40); b.Property<decimal>("Total"); b.Property<string>("Username") .IsRequired(); b.HasKey("OrderId"); }); modelBuilder.Entity("PartsUnlimited.Models.OrderDetail", b => { b.Property<int>("OrderDetailId") .ValueGeneratedOnAdd(); b.Property<int>("OrderId"); b.Property<int>("ProductId"); b.Property<int>("Quantity"); b.Property<decimal>("UnitPrice"); b.HasKey("OrderDetailId"); }); modelBuilder.Entity("PartsUnlimited.Models.Product", b => { b.Property<int>("ProductId") .ValueGeneratedOnAdd(); b.Property<int>("CategoryId"); b.Property<DateTime>("Created"); b.Property<string>("Description") .IsRequired(); b.Property<int>("Inventory"); b.Property<int>("LeadTime"); b.Property<decimal>("Price"); b.Property<string>("ProductArtUrl") .IsRequired() .HasAnnotation("MaxLength", 1024); b.Property<string>("ProductDetails") .IsRequired(); b.Property<int>("RecommendationId"); b.Property<decimal>("SalePrice"); b.Property<string>("SkuNumber") .IsRequired(); b.Property<string>("Title") .IsRequired() .HasAnnotation("MaxLength", 160); b.HasKey("ProductId"); }); modelBuilder.Entity("PartsUnlimited.Models.Raincheck", b => { b.Property<int>("RaincheckId") .ValueGeneratedOnAdd(); b.Property<string>("Name"); b.Property<int>("ProductId"); b.Property<int>("Quantity"); b.Property<double>("SalePrice"); b.Property<int>("StoreId"); b.HasKey("RaincheckId"); }); modelBuilder.Entity("PartsUnlimited.Models.Store", b => { b.Property<int>("StoreId") .ValueGeneratedOnAdd(); b.Property<string>("Name"); b.HasKey("StoreId"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b => { b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") .WithMany() .HasForeignKey("RoleId"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b => { b.HasOne("PartsUnlimited.Models.ApplicationUser") .WithMany() .HasForeignKey("UserId"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b => { b.HasOne("PartsUnlimited.Models.ApplicationUser") .WithMany() .HasForeignKey("UserId"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b => { b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") .WithMany() .HasForeignKey("RoleId"); b.HasOne("PartsUnlimited.Models.ApplicationUser") .WithMany() .HasForeignKey("UserId"); }); modelBuilder.Entity("PartsUnlimited.Models.CartItem", b => { b.HasOne("PartsUnlimited.Models.Product") .WithMany() .HasForeignKey("ProductId"); }); modelBuilder.Entity("PartsUnlimited.Models.OrderDetail", b => { b.HasOne("PartsUnlimited.Models.Order") .WithMany() .HasForeignKey("OrderId"); b.HasOne("PartsUnlimited.Models.Product") .WithMany() .HasForeignKey("ProductId"); }); modelBuilder.Entity("PartsUnlimited.Models.Product", b => { b.HasOne("PartsUnlimited.Models.Category") .WithMany() .HasForeignKey("CategoryId"); }); modelBuilder.Entity("PartsUnlimited.Models.Raincheck", b => { b.HasOne("PartsUnlimited.Models.Product") .WithMany() .HasForeignKey("ProductId"); b.HasOne("PartsUnlimited.Models.Store") .WithMany() .HasForeignKey("StoreId"); }); } } }
33.65625
117
0.456438
[ "MIT" ]
Delta-N/PracticalDevOps
src/PartsUnlimited.Website/Data/Migrations/20151222030342_InitialMigration.Designer.cs
12,924
C#
using System; using System.Threading; #if !NETFX_CORE namespace Custom_Scenery.Compression { internal class DeflateStreamAsyncResult : IAsyncResult { public byte[] buffer; public int offset; public int count; // disable csharp compiler warning #0414: field assigned unused value #pragma warning disable 0414 public bool isWrite; #pragma warning restore 0414 private object m_AsyncObject; // Caller's async object. private object m_AsyncState; // Caller's state object. private AsyncCallback m_AsyncCallback; // Caller's callback method. private object m_Result; // Final IO result to be returned byt the End*() method. internal bool m_CompletedSynchronously; // true if the operation completed synchronously. private int m_InvokedCallback; // 0 is callback is not called private int m_Completed; // 0 if not completed >0 otherwise. private object m_Event; // lazy allocated event to be returned in the IAsyncResult for the client to wait on public DeflateStreamAsyncResult(object asyncObject, object asyncState, AsyncCallback asyncCallback, byte[] buffer, int offset, int count) { this.buffer = buffer; this.offset = offset; this.count = count; m_CompletedSynchronously = true; m_AsyncObject = asyncObject; m_AsyncState = asyncState; m_AsyncCallback = asyncCallback; } // Interface method to return the caller's state object. public object AsyncState { get { return m_AsyncState; } } // Interface property to return a WaitHandle that can be waited on for I/O completion. // This property implements lazy event creation. // the event object is only created when this property is accessed, // since we're internally only using callbacks, as long as the user is using // callbacks as well we will not create an event at all. public WaitHandle AsyncWaitHandle { get { // save a copy of the completion status int savedCompleted = m_Completed; if (m_Event == null) { // lazy allocation of the event: // if this property is never accessed this object is never created Interlocked.CompareExchange(ref m_Event, new ManualResetEvent(savedCompleted != 0), null); } ManualResetEvent castedEvent = (ManualResetEvent)m_Event; if (savedCompleted == 0 && m_Completed != 0) { // if, while the event was created in the reset state, // the IO operation completed, set the event here. castedEvent.Set(); } return castedEvent; } } // Interface property, returning synchronous completion status. public bool CompletedSynchronously { get { return m_CompletedSynchronously; } } // Interface property, returning completion status. public bool IsCompleted { get { return m_Completed != 0; } } // Internal property for setting the IO result. internal object Result { get { return m_Result; } } internal void Close() { if (m_Event != null) { ((ManualResetEvent)m_Event).Close(); } } internal void InvokeCallback(bool completedSynchronously, object result) { Complete(completedSynchronously, result); } internal void InvokeCallback(object result) { Complete(result); } // Internal method for setting completion. // As a side effect, we'll signal the WaitHandle event and clean up. private void Complete(bool completedSynchronously, object result) { m_CompletedSynchronously = completedSynchronously; Complete(result); } private void Complete(object result) { m_Result = result; // Set IsCompleted and the event only after the usercallback method. Interlocked.Increment(ref m_Completed); if (m_Event != null) { ((ManualResetEvent)m_Event).Set(); } if (Interlocked.Increment(ref m_InvokedCallback) == 1) { if (m_AsyncCallback != null) { m_AsyncCallback(this); } } } } } #endif
36.992424
137
0.565022
[ "MIT" ]
ParkitectNexus/Billboards
Compression/DeflateStreamAsyncResult.cs
4,883
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace URBDRemoteService { public static class ServiceHelper { private const int STANDARD_RIGHTS_REQUIRED = 0xF0000; private const int SERVICE_WIN32_OWN_PROCESS = 0x00000010; [StructLayout(LayoutKind.Sequential)] private class SERVICE_STATUS { public int dwServiceType = 0; public ServiceState dwCurrentState = 0; public int dwControlsAccepted = 0; public int dwWin32ExitCode = 0; public int dwServiceSpecificExitCode = 0; public int dwCheckPoint = 0; public int dwWaitHint = 0; } /// <summary> /// /// </summary> [Flags] public enum ServiceManagerRights { /// <summary> /// /// </summary> Connect = 0x0001, /// <summary> /// /// </summary> CreateService = 0x0002, /// <summary> /// /// </summary> EnumerateService = 0x0004, /// <summary> /// /// </summary> Lock = 0x0008, /// <summary> /// /// </summary> QueryLockStatus = 0x0010, /// <summary> /// /// </summary> ModifyBootConfig = 0x0020, /// <summary> /// /// </summary> StandardRightsRequired = 0xF0000, /// <summary> /// /// </summary> AllAccess = (StandardRightsRequired | Connect | CreateService | EnumerateService | Lock | QueryLockStatus | ModifyBootConfig) } /// <summary> /// /// </summary> [Flags] public enum ServiceRights { /// <summary> /// /// </summary> QueryConfig = 0x1, /// <summary> /// /// </summary> ChangeConfig = 0x2, /// <summary> /// /// </summary> QueryStatus = 0x4, /// <summary> /// /// </summary> EnumerateDependants = 0x8, /// <summary> /// /// </summary> Start = 0x10, /// <summary> /// /// </summary> Stop = 0x20, /// <summary> /// /// </summary> PauseContinue = 0x40, /// <summary> /// /// </summary> Interrogate = 0x80, /// <summary> /// /// </summary> UserDefinedControl = 0x100, /// <summary> /// /// </summary> Delete = 0x00010000, /// <summary> /// /// </summary> StandardRightsRequired = 0xF0000, /// <summary> /// /// </summary> AllAccess = (StandardRightsRequired | QueryConfig | ChangeConfig | QueryStatus | EnumerateDependants | Start | Stop | PauseContinue | Interrogate | UserDefinedControl) } /// <summary> /// /// </summary> public enum ServiceBootFlag { /// <summary> /// /// </summary> Start = 0x00000000, /// <summary> /// /// </summary> SystemStart = 0x00000001, /// <summary> /// /// </summary> AutoStart = 0x00000002, /// <summary> /// /// </summary> DemandStart = 0x00000003, /// <summary> /// /// </summary> Disabled = 0x00000004 } /// <summary> /// /// </summary> public enum ServiceState { /// <summary> /// /// </summary> Unknown = -1, // The state cannot be (has not been) retrieved. /// <summary> /// /// </summary> NotFound = 0, // The service is not known on the host server. /// <summary> /// /// </summary> Stop = 1, // The service is NET stopped. /// <summary> /// /// </summary> Run = 2, // The service is NET started. /// <summary> /// /// </summary> Stopping = 3, /// <summary> /// /// </summary> Starting = 4, } /// <summary> /// /// </summary> public enum ServiceControl { /// <summary> /// /// </summary> Stop = 0x00000001, /// <summary> /// /// </summary> Pause = 0x00000002, /// <summary> /// /// </summary> Continue = 0x00000003, /// <summary> /// /// </summary> Interrogate = 0x00000004, /// <summary> /// /// </summary> Shutdown = 0x00000005, /// <summary> /// /// </summary> ParamChange = 0x00000006, /// <summary> /// /// </summary> NetBindAdd = 0x00000007, /// <summary> /// /// </summary> NetBindRemove = 0x00000008, /// <summary> /// /// </summary> NetBindEnable = 0x00000009, /// <summary> /// /// </summary> NetBindDisable = 0x0000000A } /// <summary> /// /// </summary> public enum ServiceError { /// <summary> /// /// </summary> Ignore = 0x00000000, /// <summary> /// /// </summary> Normal = 0x00000001, /// <summary> /// /// </summary> Severe = 0x00000002, /// <summary> /// /// </summary> Critical = 0x00000003 } [DllImport("advapi32.dll", EntryPoint = "OpenSCManagerA")] private static extern IntPtr OpenSCManager(string lpMachineName, string lpDatabaseName, ServiceManagerRights dwDesiredAccess); [DllImport("advapi32.dll", EntryPoint = "OpenServiceA", CharSet = CharSet.Ansi)] private static extern IntPtr OpenService(IntPtr hSCManager, string lpServiceName, ServiceRights dwDesiredAccess); [DllImport("advapi32.dll", EntryPoint = "CreateServiceA")] private static extern IntPtr CreateService(IntPtr hSCManager, string lpServiceName, string lpDisplayName, ServiceRights dwDesiredAccess, int dwServiceType, ServiceBootFlag dwStartType, ServiceError dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lp, string lpPassword); [DllImport("advapi32.dll")] private static extern int CloseServiceHandle(IntPtr hSCObject); [DllImport("advapi32.dll")] private static extern int QueryServiceStatus(IntPtr hService, SERVICE_STATUS lpServiceStatus); [DllImport("advapi32.dll", SetLastError = true)] private static extern int DeleteService(IntPtr hService); [DllImport("advapi32.dll")] private static extern int ControlService(IntPtr hService, ServiceControl dwControl, SERVICE_STATUS lpServiceStatus); [DllImport("advapi32.dll", EntryPoint = "StartServiceA")] private static extern int StartService(IntPtr hService, int dwNumServiceArgs, int lpServiceArgVectors); /// <summary> /// Takes a service name and tries to stop and then uninstall the windows serviceError /// </summary> /// <param name="ServiceName">The windows service name to uninstall</param> public static void Uninstall(string ServiceName) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect); try { IntPtr service = OpenService(scman, ServiceName, ServiceRights.StandardRightsRequired | ServiceRights.Stop | ServiceRights.QueryStatus); if (service == IntPtr.Zero) { throw new ApplicationException("Service not installed."); } try { StopService(service); int ret = DeleteService(service); if (ret == 0) { int error = Marshal.GetLastWin32Error(); throw new ApplicationException("Could not delete service " + error); } } finally { CloseServiceHandle(service); } } finally { CloseServiceHandle(scman); } } /// <summary> /// Accepts a service name and returns true if the service with that service name exists /// </summary> /// <param name="ServiceName">The service name that we will check for existence</param> /// <returns>True if that service exists false otherwise</returns> public static bool ServiceIsInstalled(string ServiceName) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect); try { IntPtr service = OpenService(scman, ServiceName, ServiceRights.QueryStatus); if (service == IntPtr.Zero) return false; CloseServiceHandle(service); return true; } finally { CloseServiceHandle(scman); } } /// <summary> /// Takes a service name, a service display name and the path to the service executable and installs / starts the windows service. /// </summary> /// <param name="ServiceName">The service name that this service will have</param> /// <param name="DisplayName">The display name that this service will have</param> /// <param name="FileName">The path to the executable of the service</param> public static void InstallAndStart(string ServiceName, string DisplayName, string FileName) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect | ServiceManagerRights.CreateService); try { IntPtr service = OpenService(scman, ServiceName, ServiceRights.QueryStatus | ServiceRights.Start); if (service == IntPtr.Zero) { service = CreateService(scman, ServiceName, DisplayName, ServiceRights.QueryStatus | ServiceRights.Start, SERVICE_WIN32_OWN_PROCESS, ServiceBootFlag.AutoStart, ServiceError.Normal, FileName, null, IntPtr.Zero, null, null, null); } if (service == IntPtr.Zero) { throw new ApplicationException("Failed to install service."); } try { StartService(service); } finally { CloseServiceHandle(service); } } finally { CloseServiceHandle(scman); } } /// <summary> /// Takes a service name and starts it /// </summary> /// <param name="Name">The service name</param> public static void StartService(string Name) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect); try { IntPtr hService = OpenService(scman, Name, ServiceRights.QueryStatus | ServiceRights.Start); if (hService == IntPtr.Zero) { throw new ApplicationException("Could not open service."); } try { StartService(hService); } finally { CloseServiceHandle(hService); } } finally { CloseServiceHandle(scman); } } /// <summary> /// Stops the provided windows service /// </summary> /// <param name="Name">The service name that will be stopped</param> public static void StopService(string Name) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect); try { IntPtr hService = OpenService(scman, Name, ServiceRights.QueryStatus | ServiceRights.Stop); if (hService == IntPtr.Zero) { throw new ApplicationException("Could not open service."); } try { StopService(hService); } finally { CloseServiceHandle(hService); } } finally { CloseServiceHandle(scman); } } /// <summary> /// Stars the provided windows service /// </summary> /// <param name="hService">The handle to the windows service</param> private static void StartService(IntPtr hService) { SERVICE_STATUS status = new SERVICE_STATUS(); StartService(hService, 0, 0); WaitForServiceStatus(hService, ServiceState.Starting, ServiceState.Run); } /// <summary> /// Stops the provided windows service /// </summary> /// <param name="hService">The handle to the windows service</param> private static void StopService(IntPtr hService) { SERVICE_STATUS status = new SERVICE_STATUS(); ControlService(hService, ServiceControl.Stop, status); WaitForServiceStatus(hService, ServiceState.Stopping, ServiceState.Stop); } /// <summary> /// Takes a service name and returns the <code>ServiceState</code> of the corresponding service /// </summary> /// <param name="ServiceName">The service name that we will check for his <code>ServiceState</code></param> /// <returns>The ServiceState of the service we wanted to check</returns> public static ServiceState GetServiceStatus(string ServiceName) { IntPtr scman = OpenSCManager(ServiceManagerRights.Connect); try { IntPtr hService = OpenService(scman, ServiceName, ServiceRights.QueryStatus); if (hService == IntPtr.Zero) { return ServiceState.NotFound; } try { return GetServiceStatus(hService); } finally { CloseServiceHandle(scman); } } finally { CloseServiceHandle(scman); } } /// <summary> /// Gets the service state by using the handle of the provided windows service /// </summary> /// <param name="hService">The handle to the service</param> /// <returns>The <code>ServiceState</code> of the service</returns> private static ServiceState GetServiceStatus(IntPtr hService) { SERVICE_STATUS ssStatus = new SERVICE_STATUS(); if (QueryServiceStatus(hService, ssStatus) == 0) { throw new ApplicationException("Failed to query service status."); } return ssStatus.dwCurrentState; } /// <summary> /// Returns true when the service status has been changes from wait status to desired status /// ,this method waits around 10 seconds for this operation. /// </summary> /// <param name="hService">The handle to the service</param> /// <param name="WaitStatus">The current state of the service</param> /// <param name="DesiredStatus">The desired state of the service</param> /// <returns>bool if the service has successfully changed states within the allowed timeline</returns> private static bool WaitForServiceStatus(IntPtr hService, ServiceState WaitStatus, ServiceState DesiredStatus) { SERVICE_STATUS ssStatus = new SERVICE_STATUS(); int dwOldCheckPoint; int dwStartTickCount; QueryServiceStatus(hService, ssStatus); if (ssStatus.dwCurrentState == DesiredStatus) return true; dwStartTickCount = Environment.TickCount; dwOldCheckPoint = ssStatus.dwCheckPoint; while (ssStatus.dwCurrentState == WaitStatus) { // Do not wait longer than the wait hint. A good interval is // one tenth the wait hint, but no less than 1 second and no // more than 10 seconds. int dwWaitTime = ssStatus.dwWaitHint / 10; if (dwWaitTime < 1000) dwWaitTime = 1000; else if (dwWaitTime > 10000) dwWaitTime = 10000; System.Threading.Thread.Sleep(dwWaitTime); // Check the status again. if (QueryServiceStatus(hService, ssStatus) == 0) break; if (ssStatus.dwCheckPoint > dwOldCheckPoint) { // The service is making progress. dwStartTickCount = Environment.TickCount; dwOldCheckPoint = ssStatus.dwCheckPoint; } else { if (Environment.TickCount - dwStartTickCount > ssStatus.dwWaitHint) { // No progress made within the wait hint break; } } } return (ssStatus.dwCurrentState == DesiredStatus); } /// <summary> /// Opens the service manager /// </summary> /// <param name="Rights">The service manager rights</param> /// <returns>the handle to the service manager</returns> private static IntPtr OpenSCManager(ServiceManagerRights Rights) { IntPtr scman = OpenSCManager(null, null, Rights); if (scman == IntPtr.Zero) { throw new ApplicationException("Could not connect to service control manager."); } return scman; } } }
34.768166
139
0.471537
[ "Apache-2.0" ]
iremezoff/urbd
Ugoria.URBD.RemoteWindowsService/ServiceHelper.cs
20,098
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the sagemaker-2017-07-24.normal.json service model. */ using System; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Amazon.Runtime; using Amazon.SageMaker.Model; namespace Amazon.SageMaker { /// <summary> /// Interface for accessing SageMaker /// /// Provides APIs for creating and managing Amazon SageMaker resources. /// /// /// <para> /// Other Resources: /// </para> /// <ul> <li> /// <para> /// <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html#first-time-user">Amazon /// SageMaker Developer Guide</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/Welcome.html">Amazon /// Augmented AI Runtime API Reference</a> /// </para> /// </li> </ul> /// </summary> public partial interface IAmazonSageMaker : IAmazonService, IDisposable { /// <summary> /// Paginators for the service /// </summary> ISageMakerPaginatorFactory Paginators { get; } #region AddAssociation /// <summary> /// Creates an <i>association</i> between the source and the destination. A source can /// be associated with multiple destinations, and a destination can be associated with /// multiple sources. An association is a lineage tracking entity. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddAssociation service method.</param> /// /// <returns>The response from the AddAssociation service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddAssociation">REST API Reference for AddAssociation Operation</seealso> AddAssociationResponse AddAssociation(AddAssociationRequest request); /// <summary> /// Creates an <i>association</i> between the source and the destination. A source can /// be associated with multiple destinations, and a destination can be associated with /// multiple sources. An association is a lineage tracking entity. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddAssociation service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the AddAssociation service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddAssociation">REST API Reference for AddAssociation Operation</seealso> Task<AddAssociationResponse> AddAssociationAsync(AddAssociationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region AddTags /// <summary> /// Adds or overwrites one or more tags for the specified Amazon SageMaker resource. You /// can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch /// transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. /// /// /// <para> /// Each tag consists of a key and an optional value. Tag keys must be unique per resource. /// For more information about tags, see For more information, see <a href="https://aws.amazon.com/answers/account-management/aws-tagging-strategies/">Amazon /// Web Services Tagging Strategies</a>. /// </para> /// <note> /// <para> /// Tags that you add to a hyperparameter tuning job by calling this API are also added /// to any training jobs that the hyperparameter tuning job launches after you call this /// API, but not to training jobs that the hyperparameter tuning job launched before you /// called this API. To make sure that the tags associated with a hyperparameter tuning /// job are also added to all training jobs that the hyperparameter tuning job launches, /// add the tags when you first create the tuning job by specifying them in the <code>Tags</code> /// parameter of <a>CreateHyperParameterTuningJob</a> /// </para> /// </note> <note> /// <para> /// Tags that you add to a SageMaker Studio Domain or User Profile by calling this API /// are also added to any Apps that the Domain or User Profile launches after you call /// this API, but not to Apps that the Domain or User Profile launched before you called /// this API. To make sure that the tags associated with a Domain or User Profile are /// also added to all Apps that the Domain or User Profile launches, add the tags when /// you first create the Domain or User Profile by specifying them in the <code>Tags</code> /// parameter of <a>CreateDomain</a> or <a>CreateUserProfile</a>. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param> /// /// <returns>The response from the AddTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags">REST API Reference for AddTags Operation</seealso> AddTagsResponse AddTags(AddTagsRequest request); /// <summary> /// Adds or overwrites one or more tags for the specified Amazon SageMaker resource. You /// can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch /// transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. /// /// /// <para> /// Each tag consists of a key and an optional value. Tag keys must be unique per resource. /// For more information about tags, see For more information, see <a href="https://aws.amazon.com/answers/account-management/aws-tagging-strategies/">Amazon /// Web Services Tagging Strategies</a>. /// </para> /// <note> /// <para> /// Tags that you add to a hyperparameter tuning job by calling this API are also added /// to any training jobs that the hyperparameter tuning job launches after you call this /// API, but not to training jobs that the hyperparameter tuning job launched before you /// called this API. To make sure that the tags associated with a hyperparameter tuning /// job are also added to all training jobs that the hyperparameter tuning job launches, /// add the tags when you first create the tuning job by specifying them in the <code>Tags</code> /// parameter of <a>CreateHyperParameterTuningJob</a> /// </para> /// </note> <note> /// <para> /// Tags that you add to a SageMaker Studio Domain or User Profile by calling this API /// are also added to any Apps that the Domain or User Profile launches after you call /// this API, but not to Apps that the Domain or User Profile launched before you called /// this API. To make sure that the tags associated with a Domain or User Profile are /// also added to all Apps that the Domain or User Profile launches, add the tags when /// you first create the Domain or User Profile by specifying them in the <code>Tags</code> /// parameter of <a>CreateDomain</a> or <a>CreateUserProfile</a>. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the AddTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags">REST API Reference for AddTags Operation</seealso> Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region AssociateTrialComponent /// <summary> /// Associates a trial component with a trial. A trial component can be associated with /// multiple trials. To disassociate a trial component from a trial, call the <a>DisassociateTrialComponent</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AssociateTrialComponent service method.</param> /// /// <returns>The response from the AssociateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AssociateTrialComponent">REST API Reference for AssociateTrialComponent Operation</seealso> AssociateTrialComponentResponse AssociateTrialComponent(AssociateTrialComponentRequest request); /// <summary> /// Associates a trial component with a trial. A trial component can be associated with /// multiple trials. To disassociate a trial component from a trial, call the <a>DisassociateTrialComponent</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AssociateTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the AssociateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AssociateTrialComponent">REST API Reference for AssociateTrialComponent Operation</seealso> Task<AssociateTrialComponentResponse> AssociateTrialComponentAsync(AssociateTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateAction /// <summary> /// Creates an <i>action</i>. An action is a lineage tracking entity that represents an /// action or activity. For example, a model deployment or an HPO job. Generally, an action /// involves at least one input or output artifact. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateAction</code> can only be invoked from within an SageMaker managed environment. /// This includes SageMaker training jobs, processing jobs, transform jobs, and SageMaker /// notebooks. A call to <code>CreateAction</code> from outside one of these environments /// results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAction service method.</param> /// /// <returns>The response from the CreateAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAction">REST API Reference for CreateAction Operation</seealso> CreateActionResponse CreateAction(CreateActionRequest request); /// <summary> /// Creates an <i>action</i>. An action is a lineage tracking entity that represents an /// action or activity. For example, a model deployment or an HPO job. Generally, an action /// involves at least one input or output artifact. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateAction</code> can only be invoked from within an SageMaker managed environment. /// This includes SageMaker training jobs, processing jobs, transform jobs, and SageMaker /// notebooks. A call to <code>CreateAction</code> from outside one of these environments /// results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAction service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAction">REST API Reference for CreateAction Operation</seealso> Task<CreateActionResponse> CreateActionAsync(CreateActionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateAlgorithm /// <summary> /// Create a machine learning algorithm that you can use in Amazon SageMaker and list /// in the Amazon Web Services Marketplace. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAlgorithm service method.</param> /// /// <returns>The response from the CreateAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm">REST API Reference for CreateAlgorithm Operation</seealso> CreateAlgorithmResponse CreateAlgorithm(CreateAlgorithmRequest request); /// <summary> /// Create a machine learning algorithm that you can use in Amazon SageMaker and list /// in the Amazon Web Services Marketplace. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAlgorithm service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm">REST API Reference for CreateAlgorithm Operation</seealso> Task<CreateAlgorithmResponse> CreateAlgorithmAsync(CreateAlgorithmRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateApp /// <summary> /// Creates a running app for the specified UserProfile. Supported apps are <code>JupyterServer</code> /// and <code>KernelGateway</code>. This operation is automatically invoked by Amazon /// SageMaker Studio upon access to the associated Domain, and when new kernel configurations /// are selected by the user. A user may have multiple Apps active simultaneously. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateApp service method.</param> /// /// <returns>The response from the CreateApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateApp">REST API Reference for CreateApp Operation</seealso> CreateAppResponse CreateApp(CreateAppRequest request); /// <summary> /// Creates a running app for the specified UserProfile. Supported apps are <code>JupyterServer</code> /// and <code>KernelGateway</code>. This operation is automatically invoked by Amazon /// SageMaker Studio upon access to the associated Domain, and when new kernel configurations /// are selected by the user. A user may have multiple Apps active simultaneously. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateApp service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateApp">REST API Reference for CreateApp Operation</seealso> Task<CreateAppResponse> CreateAppAsync(CreateAppRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateAppImageConfig /// <summary> /// Creates a configuration for running a SageMaker image as a KernelGateway app. The /// configuration specifies the Amazon Elastic File System (EFS) storage volume on the /// image, and a list of the kernels in the image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAppImageConfig service method.</param> /// /// <returns>The response from the CreateAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAppImageConfig">REST API Reference for CreateAppImageConfig Operation</seealso> CreateAppImageConfigResponse CreateAppImageConfig(CreateAppImageConfigRequest request); /// <summary> /// Creates a configuration for running a SageMaker image as a KernelGateway app. The /// configuration specifies the Amazon Elastic File System (EFS) storage volume on the /// image, and a list of the kernels in the image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAppImageConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAppImageConfig">REST API Reference for CreateAppImageConfig Operation</seealso> Task<CreateAppImageConfigResponse> CreateAppImageConfigAsync(CreateAppImageConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateArtifact /// <summary> /// Creates an <i>artifact</i>. An artifact is a lineage tracking entity that represents /// a URI addressable object or data. Some examples are the S3 URI of a dataset and the /// ECR registry path of an image. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateArtifact</code> can only be invoked from within an SageMaker managed /// environment. This includes SageMaker training jobs, processing jobs, transform jobs, /// and SageMaker notebooks. A call to <code>CreateArtifact</code> from outside one of /// these environments results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateArtifact service method.</param> /// /// <returns>The response from the CreateArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateArtifact">REST API Reference for CreateArtifact Operation</seealso> CreateArtifactResponse CreateArtifact(CreateArtifactRequest request); /// <summary> /// Creates an <i>artifact</i>. An artifact is a lineage tracking entity that represents /// a URI addressable object or data. Some examples are the S3 URI of a dataset and the /// ECR registry path of an image. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateArtifact</code> can only be invoked from within an SageMaker managed /// environment. This includes SageMaker training jobs, processing jobs, transform jobs, /// and SageMaker notebooks. A call to <code>CreateArtifact</code> from outside one of /// these environments results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateArtifact service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateArtifact">REST API Reference for CreateArtifact Operation</seealso> Task<CreateArtifactResponse> CreateArtifactAsync(CreateArtifactRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateAutoMLJob /// <summary> /// Creates an Autopilot job. /// /// /// <para> /// Find the best-performing model after you run an Autopilot job by calling . /// </para> /// /// <para> /// For information about how to use Autopilot, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html">Automate /// Model Development with Amazon SageMaker Autopilot</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAutoMLJob service method.</param> /// /// <returns>The response from the CreateAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAutoMLJob">REST API Reference for CreateAutoMLJob Operation</seealso> CreateAutoMLJobResponse CreateAutoMLJob(CreateAutoMLJobRequest request); /// <summary> /// Creates an Autopilot job. /// /// /// <para> /// Find the best-performing model after you run an Autopilot job by calling . /// </para> /// /// <para> /// For information about how to use Autopilot, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html">Automate /// Model Development with Amazon SageMaker Autopilot</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateAutoMLJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAutoMLJob">REST API Reference for CreateAutoMLJob Operation</seealso> Task<CreateAutoMLJobResponse> CreateAutoMLJobAsync(CreateAutoMLJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateCodeRepository /// <summary> /// Creates a Git repository as a resource in your Amazon SageMaker account. You can associate /// the repository with notebook instances so that you can use Git source control for /// the notebooks you create. The Git repository is a resource in your Amazon SageMaker /// account, so it can be associated with more than one notebook instance, and it persists /// independently from the lifecycle of any notebook instances it is associated with. /// /// /// <para> /// The repository can be hosted either in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon /// Web Services CodeCommit</a> or in any other Git repository. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateCodeRepository service method.</param> /// /// <returns>The response from the CreateCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository">REST API Reference for CreateCodeRepository Operation</seealso> CreateCodeRepositoryResponse CreateCodeRepository(CreateCodeRepositoryRequest request); /// <summary> /// Creates a Git repository as a resource in your Amazon SageMaker account. You can associate /// the repository with notebook instances so that you can use Git source control for /// the notebooks you create. The Git repository is a resource in your Amazon SageMaker /// account, so it can be associated with more than one notebook instance, and it persists /// independently from the lifecycle of any notebook instances it is associated with. /// /// /// <para> /// The repository can be hosted either in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon /// Web Services CodeCommit</a> or in any other Git repository. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateCodeRepository service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository">REST API Reference for CreateCodeRepository Operation</seealso> Task<CreateCodeRepositoryResponse> CreateCodeRepositoryAsync(CreateCodeRepositoryRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateCompilationJob /// <summary> /// Starts a model compilation job. After the model has been compiled, Amazon SageMaker /// saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) /// bucket that you specify. /// /// /// <para> /// If you choose to host your model using Amazon SageMaker hosting services, you can /// use the resulting model artifacts as part of the model. You can also use the artifacts /// with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// A name for the compilation job /// </para> /// </li> <li> /// <para> /// Information about the input model artifacts /// </para> /// </li> <li> /// <para> /// The output location for the compiled model and the device (target) that the model /// runs on /// </para> /// </li> <li> /// <para> /// The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform /// the model compilation job. /// </para> /// </li> </ul> /// <para> /// You can also provide a <code>Tag</code> to track the model compilation job's resource /// use and costs. The response body contains the <code>CompilationJobArn</code> for the /// compiled job. /// </para> /// /// <para> /// To stop a model compilation job, use <a>StopCompilationJob</a>. To get information /// about a particular model compilation job, use <a>DescribeCompilationJob</a>. To get /// information about multiple model compilation jobs, use <a>ListCompilationJobs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateCompilationJob service method.</param> /// /// <returns>The response from the CreateCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob">REST API Reference for CreateCompilationJob Operation</seealso> CreateCompilationJobResponse CreateCompilationJob(CreateCompilationJobRequest request); /// <summary> /// Starts a model compilation job. After the model has been compiled, Amazon SageMaker /// saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) /// bucket that you specify. /// /// /// <para> /// If you choose to host your model using Amazon SageMaker hosting services, you can /// use the resulting model artifacts as part of the model. You can also use the artifacts /// with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// A name for the compilation job /// </para> /// </li> <li> /// <para> /// Information about the input model artifacts /// </para> /// </li> <li> /// <para> /// The output location for the compiled model and the device (target) that the model /// runs on /// </para> /// </li> <li> /// <para> /// The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform /// the model compilation job. /// </para> /// </li> </ul> /// <para> /// You can also provide a <code>Tag</code> to track the model compilation job's resource /// use and costs. The response body contains the <code>CompilationJobArn</code> for the /// compiled job. /// </para> /// /// <para> /// To stop a model compilation job, use <a>StopCompilationJob</a>. To get information /// about a particular model compilation job, use <a>DescribeCompilationJob</a>. To get /// information about multiple model compilation jobs, use <a>ListCompilationJobs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateCompilationJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob">REST API Reference for CreateCompilationJob Operation</seealso> Task<CreateCompilationJobResponse> CreateCompilationJobAsync(CreateCompilationJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateContext /// <summary> /// Creates a <i>context</i>. A context is a lineage tracking entity that represents a /// logical grouping of other tracking or experiment entities. Some examples are an endpoint /// and a model package. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateContext</code> can only be invoked from within an SageMaker managed environment. /// This includes SageMaker training jobs, processing jobs, transform jobs, and SageMaker /// notebooks. A call to <code>CreateContext</code> from outside one of these environments /// results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateContext service method.</param> /// /// <returns>The response from the CreateContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateContext">REST API Reference for CreateContext Operation</seealso> CreateContextResponse CreateContext(CreateContextRequest request); /// <summary> /// Creates a <i>context</i>. A context is a lineage tracking entity that represents a /// logical grouping of other tracking or experiment entities. Some examples are an endpoint /// and a model package. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/lineage-tracking.html">Amazon /// SageMaker ML Lineage Tracking</a>. /// /// <note> /// <para> /// <code>CreateContext</code> can only be invoked from within an SageMaker managed environment. /// This includes SageMaker training jobs, processing jobs, transform jobs, and SageMaker /// notebooks. A call to <code>CreateContext</code> from outside one of these environments /// results in an error. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateContext service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateContext">REST API Reference for CreateContext Operation</seealso> Task<CreateContextResponse> CreateContextAsync(CreateContextRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateDataQualityJobDefinition /// <summary> /// Creates a definition for a job that monitors data quality and drift. For information /// about model monitor, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html">Amazon /// SageMaker Model Monitor</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDataQualityJobDefinition service method.</param> /// /// <returns>The response from the CreateDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDataQualityJobDefinition">REST API Reference for CreateDataQualityJobDefinition Operation</seealso> CreateDataQualityJobDefinitionResponse CreateDataQualityJobDefinition(CreateDataQualityJobDefinitionRequest request); /// <summary> /// Creates a definition for a job that monitors data quality and drift. For information /// about model monitor, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html">Amazon /// SageMaker Model Monitor</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDataQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDataQualityJobDefinition">REST API Reference for CreateDataQualityJobDefinition Operation</seealso> Task<CreateDataQualityJobDefinitionResponse> CreateDataQualityJobDefinitionAsync(CreateDataQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateDeviceFleet /// <summary> /// Creates a device fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDeviceFleet service method.</param> /// /// <returns>The response from the CreateDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDeviceFleet">REST API Reference for CreateDeviceFleet Operation</seealso> CreateDeviceFleetResponse CreateDeviceFleet(CreateDeviceFleetRequest request); /// <summary> /// Creates a device fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDeviceFleet service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDeviceFleet">REST API Reference for CreateDeviceFleet Operation</seealso> Task<CreateDeviceFleetResponse> CreateDeviceFleetAsync(CreateDeviceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateDomain /// <summary> /// Creates a <code>Domain</code> used by Amazon SageMaker Studio. A domain consists of /// an associated Amazon Elastic File System (EFS) volume, a list of authorized users, /// and a variety of security, application, policy, and Amazon Virtual Private Cloud (VPC) /// configurations. An Amazon Web Services account is limited to one domain per region. /// Users within a domain can share notebook files and other artifacts with each other. /// /// /// <para> /// <b>EFS storage</b> /// </para> /// /// <para> /// When a domain is created, an EFS volume is created for use by all of the users within /// the domain. Each user receives a private home directory within the EFS volume for /// notebooks, Git repositories, and data files. /// </para> /// /// <para> /// SageMaker uses the Amazon Web Services Key Management Service (Amazon Web Services /// KMS) to encrypt the EFS volume attached to the domain with an Amazon Web Services /// managed customer master key (CMK) by default. For more control, you can specify a /// customer managed CMK. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/encryption-at-rest.html">Protect /// Data at Rest Using Encryption</a>. /// </para> /// /// <para> /// <b>VPC configuration</b> /// </para> /// /// <para> /// All SageMaker Studio traffic between the domain and the EFS volume is through the /// specified VPC and subnets. For other Studio traffic, you can specify the <code>AppNetworkAccessType</code> /// parameter. <code>AppNetworkAccessType</code> corresponds to the network access type /// that you choose when you onboard to Studio. The following options are available: /// </para> /// <ul> <li> /// <para> /// <code>PublicInternetOnly</code> - Non-EFS traffic goes through a VPC managed by Amazon /// SageMaker, which allows internet access. This is the default value. /// </para> /// </li> <li> /// <para> /// <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets. /// Internet access is disabled by default. To allow internet access, you must specify /// a NAT gateway. /// </para> /// /// <para> /// When internet access is disabled, you won't be able to run a Studio notebook or to /// train or host models unless your VPC has an interface endpoint to the SageMaker API /// and runtime or a NAT gateway and your security groups allow outbound connections. /// </para> /// </li> </ul> <important> /// <para> /// NFS traffic over TCP on port 2049 needs to be allowed in both inbound and outbound /// rules in order to launch a SageMaker Studio app successfully. /// </para> /// </important> /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html">Connect /// SageMaker Studio Notebooks to Resources in a VPC</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDomain service method.</param> /// /// <returns>The response from the CreateDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDomain">REST API Reference for CreateDomain Operation</seealso> CreateDomainResponse CreateDomain(CreateDomainRequest request); /// <summary> /// Creates a <code>Domain</code> used by Amazon SageMaker Studio. A domain consists of /// an associated Amazon Elastic File System (EFS) volume, a list of authorized users, /// and a variety of security, application, policy, and Amazon Virtual Private Cloud (VPC) /// configurations. An Amazon Web Services account is limited to one domain per region. /// Users within a domain can share notebook files and other artifacts with each other. /// /// /// <para> /// <b>EFS storage</b> /// </para> /// /// <para> /// When a domain is created, an EFS volume is created for use by all of the users within /// the domain. Each user receives a private home directory within the EFS volume for /// notebooks, Git repositories, and data files. /// </para> /// /// <para> /// SageMaker uses the Amazon Web Services Key Management Service (Amazon Web Services /// KMS) to encrypt the EFS volume attached to the domain with an Amazon Web Services /// managed customer master key (CMK) by default. For more control, you can specify a /// customer managed CMK. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/encryption-at-rest.html">Protect /// Data at Rest Using Encryption</a>. /// </para> /// /// <para> /// <b>VPC configuration</b> /// </para> /// /// <para> /// All SageMaker Studio traffic between the domain and the EFS volume is through the /// specified VPC and subnets. For other Studio traffic, you can specify the <code>AppNetworkAccessType</code> /// parameter. <code>AppNetworkAccessType</code> corresponds to the network access type /// that you choose when you onboard to Studio. The following options are available: /// </para> /// <ul> <li> /// <para> /// <code>PublicInternetOnly</code> - Non-EFS traffic goes through a VPC managed by Amazon /// SageMaker, which allows internet access. This is the default value. /// </para> /// </li> <li> /// <para> /// <code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets. /// Internet access is disabled by default. To allow internet access, you must specify /// a NAT gateway. /// </para> /// /// <para> /// When internet access is disabled, you won't be able to run a Studio notebook or to /// train or host models unless your VPC has an interface endpoint to the SageMaker API /// and runtime or a NAT gateway and your security groups allow outbound connections. /// </para> /// </li> </ul> <important> /// <para> /// NFS traffic over TCP on port 2049 needs to be allowed in both inbound and outbound /// rules in order to launch a SageMaker Studio app successfully. /// </para> /// </important> /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html">Connect /// SageMaker Studio Notebooks to Resources in a VPC</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateDomain service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateDomain">REST API Reference for CreateDomain Operation</seealso> Task<CreateDomainResponse> CreateDomainAsync(CreateDomainRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateEdgePackagingJob /// <summary> /// Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model /// artifacts from the Amazon Simple Storage Service bucket that you specify. After the /// model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket /// that you specify. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEdgePackagingJob service method.</param> /// /// <returns>The response from the CreateEdgePackagingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEdgePackagingJob">REST API Reference for CreateEdgePackagingJob Operation</seealso> CreateEdgePackagingJobResponse CreateEdgePackagingJob(CreateEdgePackagingJobRequest request); /// <summary> /// Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model /// artifacts from the Amazon Simple Storage Service bucket that you specify. After the /// model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket /// that you specify. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEdgePackagingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateEdgePackagingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEdgePackagingJob">REST API Reference for CreateEdgePackagingJob Operation</seealso> Task<CreateEdgePackagingJobResponse> CreateEdgePackagingJobAsync(CreateEdgePackagingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateEndpoint /// <summary> /// Creates an endpoint using the endpoint configuration specified in the request. Amazon /// SageMaker uses the endpoint to provision resources and deploy models. You create the /// endpoint configuration with the <a>CreateEndpointConfig</a> API. /// /// /// <para> /// Use this API to deploy models using Amazon SageMaker hosting services. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see the <a href="https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker-fundamentals/create-endpoint/create_endpoint.ipynb">Create /// Endpoint example notebook.</a> /// </para> /// <note> /// <para> /// You must not delete an <code>EndpointConfig</code> that is in use by an endpoint /// that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> /// operations are being performed on the endpoint. To update an endpoint, you must create /// a new <code>EndpointConfig</code>. /// </para> /// </note> /// <para> /// The endpoint name must be unique within an Amazon Web Services Region in your Amazon /// Web Services account. /// </para> /// /// <para> /// When it receives the request, Amazon SageMaker creates the endpoint, launches the /// resources (ML compute instances), and deploys the model(s) on them. /// </para> /// <note> /// <para> /// When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that /// your endpoint configuration exists. When you read data from a DynamoDB table supporting /// <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html"> /// <code>Eventually Consistent Reads</code> </a>, the response might not reflect the /// results of a recently completed write operation. The response might include some stale /// data. If the dependent entities are not yet in DynamoDB, this causes a validation /// error. If you repeat your read request after a short time, the response should return /// the latest data. So retry logic is recommended to handle these possible issues. We /// also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> /// to minimize the potential impact of a DynamoDB eventually consistent read. /// </para> /// </note> /// <para> /// When Amazon SageMaker receives the request, it sets the endpoint status to <code>Creating</code>. /// After it creates the endpoint, it sets the status to <code>InService</code>. Amazon /// SageMaker can then process incoming requests for inferences. To check the status of /// an endpoint, use the <a>DescribeEndpoint</a> API. /// </para> /// /// <para> /// If any of the models hosted at this endpoint get model data from an Amazon S3 location, /// Amazon SageMaker uses Amazon Web Services Security Token Service to download model /// artifacts from the S3 path you provided. Amazon Web Services STS is activated in your /// IAM user account by default. If you previously deactivated Amazon Web Services STS /// for a region, you need to reactivate Amazon Web Services STS for that region. For /// more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating /// and Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the /// <i>Amazon Web Services Identity and Access Management User Guide</i>. /// </para> /// <note> /// <para> /// To add the IAM role policies for using this API operation, go to the <a href="https://console.aws.amazon.com/iam/">IAM /// console</a>, and choose Roles in the left navigation pane. Search the IAM role that /// you want to grant access to use the <a>CreateEndpoint</a> and <a>CreateEndpointConfig</a> /// API operations, add the following policies to the role. /// </para> /// <ul> <li> /// <para> /// Option 1: For a full Amazon SageMaker access, search and attach the <code>AmazonSageMakerFullAccess</code> /// policy. /// </para> /// </li> <li> /// <para> /// Option 2: For granting a limited access to an IAM role, paste the following Action /// elements manually into the JSON file of the IAM role: /// </para> /// /// <para> /// <code>"Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"]</code> /// /// </para> /// /// <para> /// <code>"Resource": [</code> /// </para> /// /// <para> /// <code>"arn:aws:sagemaker:region:account-id:endpoint/endpointName"</code> /// </para> /// /// <para> /// <code>"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName"</code> /// /// </para> /// /// <para> /// <code>]</code> /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html">Amazon /// SageMaker API Permissions: Actions, Permissions, and Resources Reference</a>. /// </para> /// </li> </ul> </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEndpoint service method.</param> /// /// <returns>The response from the CreateEndpoint service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint">REST API Reference for CreateEndpoint Operation</seealso> CreateEndpointResponse CreateEndpoint(CreateEndpointRequest request); /// <summary> /// Creates an endpoint using the endpoint configuration specified in the request. Amazon /// SageMaker uses the endpoint to provision resources and deploy models. You create the /// endpoint configuration with the <a>CreateEndpointConfig</a> API. /// /// /// <para> /// Use this API to deploy models using Amazon SageMaker hosting services. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see the <a href="https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker-fundamentals/create-endpoint/create_endpoint.ipynb">Create /// Endpoint example notebook.</a> /// </para> /// <note> /// <para> /// You must not delete an <code>EndpointConfig</code> that is in use by an endpoint /// that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> /// operations are being performed on the endpoint. To update an endpoint, you must create /// a new <code>EndpointConfig</code>. /// </para> /// </note> /// <para> /// The endpoint name must be unique within an Amazon Web Services Region in your Amazon /// Web Services account. /// </para> /// /// <para> /// When it receives the request, Amazon SageMaker creates the endpoint, launches the /// resources (ML compute instances), and deploys the model(s) on them. /// </para> /// <note> /// <para> /// When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that /// your endpoint configuration exists. When you read data from a DynamoDB table supporting /// <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html"> /// <code>Eventually Consistent Reads</code> </a>, the response might not reflect the /// results of a recently completed write operation. The response might include some stale /// data. If the dependent entities are not yet in DynamoDB, this causes a validation /// error. If you repeat your read request after a short time, the response should return /// the latest data. So retry logic is recommended to handle these possible issues. We /// also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> /// to minimize the potential impact of a DynamoDB eventually consistent read. /// </para> /// </note> /// <para> /// When Amazon SageMaker receives the request, it sets the endpoint status to <code>Creating</code>. /// After it creates the endpoint, it sets the status to <code>InService</code>. Amazon /// SageMaker can then process incoming requests for inferences. To check the status of /// an endpoint, use the <a>DescribeEndpoint</a> API. /// </para> /// /// <para> /// If any of the models hosted at this endpoint get model data from an Amazon S3 location, /// Amazon SageMaker uses Amazon Web Services Security Token Service to download model /// artifacts from the S3 path you provided. Amazon Web Services STS is activated in your /// IAM user account by default. If you previously deactivated Amazon Web Services STS /// for a region, you need to reactivate Amazon Web Services STS for that region. For /// more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating /// and Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the /// <i>Amazon Web Services Identity and Access Management User Guide</i>. /// </para> /// <note> /// <para> /// To add the IAM role policies for using this API operation, go to the <a href="https://console.aws.amazon.com/iam/">IAM /// console</a>, and choose Roles in the left navigation pane. Search the IAM role that /// you want to grant access to use the <a>CreateEndpoint</a> and <a>CreateEndpointConfig</a> /// API operations, add the following policies to the role. /// </para> /// <ul> <li> /// <para> /// Option 1: For a full Amazon SageMaker access, search and attach the <code>AmazonSageMakerFullAccess</code> /// policy. /// </para> /// </li> <li> /// <para> /// Option 2: For granting a limited access to an IAM role, paste the following Action /// elements manually into the JSON file of the IAM role: /// </para> /// /// <para> /// <code>"Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"]</code> /// /// </para> /// /// <para> /// <code>"Resource": [</code> /// </para> /// /// <para> /// <code>"arn:aws:sagemaker:region:account-id:endpoint/endpointName"</code> /// </para> /// /// <para> /// <code>"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName"</code> /// /// </para> /// /// <para> /// <code>]</code> /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html">Amazon /// SageMaker API Permissions: Actions, Permissions, and Resources Reference</a>. /// </para> /// </li> </ul> </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEndpoint service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateEndpoint service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint">REST API Reference for CreateEndpoint Operation</seealso> Task<CreateEndpointResponse> CreateEndpointAsync(CreateEndpointRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateEndpointConfig /// <summary> /// Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy /// models. In the configuration, you identify one or more models, created using the <code>CreateModel</code> /// API, to deploy and the resources that you want Amazon SageMaker to provision. Then /// you call the <a>CreateEndpoint</a> API. /// /// <note> /// <para> /// Use this API if you want to use Amazon SageMaker hosting services to deploy models /// into production. /// </para> /// </note> /// <para> /// In the request, you define a <code>ProductionVariant</code>, for each model that you /// want to deploy. Each <code>ProductionVariant</code> parameter also describes the resources /// that you want Amazon SageMaker to provision. This includes the number and type of /// ML compute instances to deploy. /// </para> /// /// <para> /// If you are hosting multiple models, you also assign a <code>VariantWeight</code> to /// specify how much traffic you want to allocate to each model. For example, suppose /// that you want to host two models, A and B, and you assign traffic weight 2 for model /// A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model /// A, and one-third to model B. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html#ex1-deploy-model-boto">Deploy /// the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python /// (Boto 3)).</a> /// </para> /// <note> /// <para> /// When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that /// your endpoint configuration exists. When you read data from a DynamoDB table supporting /// <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html"> /// <code>Eventually Consistent Reads</code> </a>, the response might not reflect the /// results of a recently completed write operation. The response might include some stale /// data. If the dependent entities are not yet in DynamoDB, this causes a validation /// error. If you repeat your read request after a short time, the response should return /// the latest data. So retry logic is recommended to handle these possible issues. We /// also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> /// to minimize the potential impact of a DynamoDB eventually consistent read. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEndpointConfig service method.</param> /// /// <returns>The response from the CreateEndpointConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig">REST API Reference for CreateEndpointConfig Operation</seealso> CreateEndpointConfigResponse CreateEndpointConfig(CreateEndpointConfigRequest request); /// <summary> /// Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy /// models. In the configuration, you identify one or more models, created using the <code>CreateModel</code> /// API, to deploy and the resources that you want Amazon SageMaker to provision. Then /// you call the <a>CreateEndpoint</a> API. /// /// <note> /// <para> /// Use this API if you want to use Amazon SageMaker hosting services to deploy models /// into production. /// </para> /// </note> /// <para> /// In the request, you define a <code>ProductionVariant</code>, for each model that you /// want to deploy. Each <code>ProductionVariant</code> parameter also describes the resources /// that you want Amazon SageMaker to provision. This includes the number and type of /// ML compute instances to deploy. /// </para> /// /// <para> /// If you are hosting multiple models, you also assign a <code>VariantWeight</code> to /// specify how much traffic you want to allocate to each model. For example, suppose /// that you want to host two models, A and B, and you assign traffic weight 2 for model /// A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model /// A, and one-third to model B. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html#ex1-deploy-model-boto">Deploy /// the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python /// (Boto 3)).</a> /// </para> /// <note> /// <para> /// When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that /// your endpoint configuration exists. When you read data from a DynamoDB table supporting /// <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html"> /// <code>Eventually Consistent Reads</code> </a>, the response might not reflect the /// results of a recently completed write operation. The response might include some stale /// data. If the dependent entities are not yet in DynamoDB, this causes a validation /// error. If you repeat your read request after a short time, the response should return /// the latest data. So retry logic is recommended to handle these possible issues. We /// also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> /// to minimize the potential impact of a DynamoDB eventually consistent read. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateEndpointConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateEndpointConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig">REST API Reference for CreateEndpointConfig Operation</seealso> Task<CreateEndpointConfigResponse> CreateEndpointConfigAsync(CreateEndpointConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateExperiment /// <summary> /// Creates an SageMaker <i>experiment</i>. An experiment is a collection of <i>trials</i> /// that are observed, compared and evaluated as a group. A trial is a set of steps, called /// <i>trial components</i>, that produce a machine learning model. /// /// /// <para> /// The goal of an experiment is to determine the components that produce the best model. /// Multiple trials are performed, each one isolating and measuring the impact of a change /// to one or more inputs, while keeping the remaining inputs constant. /// </para> /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to experiments, trials, trial components and then use the <a>Search</a> /// API to search for the tags. /// </para> /// /// <para> /// To add a description to an experiment, specify the optional <code>Description</code> /// parameter. To add a description later, or to change the description, call the <a>UpdateExperiment</a> /// API. /// </para> /// /// <para> /// To get a list of all your experiments, call the <a>ListExperiments</a> API. To view /// an experiment's properties, call the <a>DescribeExperiment</a> API. To get a list /// of all the trials associated with an experiment, call the <a>ListTrials</a> API. To /// create a trial call the <a>CreateTrial</a> API. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateExperiment service method.</param> /// /// <returns>The response from the CreateExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateExperiment">REST API Reference for CreateExperiment Operation</seealso> CreateExperimentResponse CreateExperiment(CreateExperimentRequest request); /// <summary> /// Creates an SageMaker <i>experiment</i>. An experiment is a collection of <i>trials</i> /// that are observed, compared and evaluated as a group. A trial is a set of steps, called /// <i>trial components</i>, that produce a machine learning model. /// /// /// <para> /// The goal of an experiment is to determine the components that produce the best model. /// Multiple trials are performed, each one isolating and measuring the impact of a change /// to one or more inputs, while keeping the remaining inputs constant. /// </para> /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to experiments, trials, trial components and then use the <a>Search</a> /// API to search for the tags. /// </para> /// /// <para> /// To add a description to an experiment, specify the optional <code>Description</code> /// parameter. To add a description later, or to change the description, call the <a>UpdateExperiment</a> /// API. /// </para> /// /// <para> /// To get a list of all your experiments, call the <a>ListExperiments</a> API. To view /// an experiment's properties, call the <a>DescribeExperiment</a> API. To get a list /// of all the trials associated with an experiment, call the <a>ListTrials</a> API. To /// create a trial call the <a>CreateTrial</a> API. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateExperiment service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateExperiment">REST API Reference for CreateExperiment Operation</seealso> Task<CreateExperimentResponse> CreateExperimentAsync(CreateExperimentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateFeatureGroup /// <summary> /// Create a new <code>FeatureGroup</code>. A <code>FeatureGroup</code> is a group of /// <code>Features</code> defined in the <code>FeatureStore</code> to describe a <code>Record</code>. /// /// /// /// <para> /// The <code>FeatureGroup</code> defines the schema and features contained in the FeatureGroup. /// A <code>FeatureGroup</code> definition is composed of a list of <code>Features</code>, /// a <code>RecordIdentifierFeatureName</code>, an <code>EventTimeFeatureName</code> and /// configurations for its <code>OnlineStore</code> and <code>OfflineStore</code>. Check /// <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">Amazon /// Web Services service quotas</a> to see the <code>FeatureGroup</code>s quota for your /// Amazon Web Services account. /// </para> /// <important> /// <para> /// You must include at least one of <code>OnlineStoreConfig</code> and <code>OfflineStoreConfig</code> /// to create a <code>FeatureGroup</code>. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateFeatureGroup service method.</param> /// /// <returns>The response from the CreateFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateFeatureGroup">REST API Reference for CreateFeatureGroup Operation</seealso> CreateFeatureGroupResponse CreateFeatureGroup(CreateFeatureGroupRequest request); /// <summary> /// Create a new <code>FeatureGroup</code>. A <code>FeatureGroup</code> is a group of /// <code>Features</code> defined in the <code>FeatureStore</code> to describe a <code>Record</code>. /// /// /// /// <para> /// The <code>FeatureGroup</code> defines the schema and features contained in the FeatureGroup. /// A <code>FeatureGroup</code> definition is composed of a list of <code>Features</code>, /// a <code>RecordIdentifierFeatureName</code>, an <code>EventTimeFeatureName</code> and /// configurations for its <code>OnlineStore</code> and <code>OfflineStore</code>. Check /// <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">Amazon /// Web Services service quotas</a> to see the <code>FeatureGroup</code>s quota for your /// Amazon Web Services account. /// </para> /// <important> /// <para> /// You must include at least one of <code>OnlineStoreConfig</code> and <code>OfflineStoreConfig</code> /// to create a <code>FeatureGroup</code>. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateFeatureGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateFeatureGroup">REST API Reference for CreateFeatureGroup Operation</seealso> Task<CreateFeatureGroupResponse> CreateFeatureGroupAsync(CreateFeatureGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateFlowDefinition /// <summary> /// Creates a flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateFlowDefinition service method.</param> /// /// <returns>The response from the CreateFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateFlowDefinition">REST API Reference for CreateFlowDefinition Operation</seealso> CreateFlowDefinitionResponse CreateFlowDefinition(CreateFlowDefinitionRequest request); /// <summary> /// Creates a flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateFlowDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateFlowDefinition">REST API Reference for CreateFlowDefinition Operation</seealso> Task<CreateFlowDefinitionResponse> CreateFlowDefinitionAsync(CreateFlowDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateHumanTaskUi /// <summary> /// Defines the settings you will use for the human review workflow user interface. Reviewers /// will see a three-panel interface with an instruction area, the item to review, and /// an input area. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateHumanTaskUi service method.</param> /// /// <returns>The response from the CreateHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHumanTaskUi">REST API Reference for CreateHumanTaskUi Operation</seealso> CreateHumanTaskUiResponse CreateHumanTaskUi(CreateHumanTaskUiRequest request); /// <summary> /// Defines the settings you will use for the human review workflow user interface. Reviewers /// will see a three-panel interface with an instruction area, the item to review, and /// an input area. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateHumanTaskUi service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHumanTaskUi">REST API Reference for CreateHumanTaskUi Operation</seealso> Task<CreateHumanTaskUiResponse> CreateHumanTaskUiAsync(CreateHumanTaskUiRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateHyperParameterTuningJob /// <summary> /// Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version /// of a model by running many training jobs on your dataset using the algorithm you choose /// and values for hyperparameters within ranges that you specify. It then chooses the /// hyperparameter values that result in a model that performs the best, as measured by /// an objective metric that you choose. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateHyperParameterTuningJob service method.</param> /// /// <returns>The response from the CreateHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob">REST API Reference for CreateHyperParameterTuningJob Operation</seealso> CreateHyperParameterTuningJobResponse CreateHyperParameterTuningJob(CreateHyperParameterTuningJobRequest request); /// <summary> /// Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version /// of a model by running many training jobs on your dataset using the algorithm you choose /// and values for hyperparameters within ranges that you specify. It then chooses the /// hyperparameter values that result in a model that performs the best, as measured by /// an objective metric that you choose. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateHyperParameterTuningJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob">REST API Reference for CreateHyperParameterTuningJob Operation</seealso> Task<CreateHyperParameterTuningJobResponse> CreateHyperParameterTuningJobAsync(CreateHyperParameterTuningJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateImage /// <summary> /// Creates a custom SageMaker image. A SageMaker image is a set of image versions. Each /// image version represents a container image stored in Amazon Container Registry (ECR). /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html">Bring /// your own SageMaker image</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateImage service method.</param> /// /// <returns>The response from the CreateImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateImage">REST API Reference for CreateImage Operation</seealso> CreateImageResponse CreateImage(CreateImageRequest request); /// <summary> /// Creates a custom SageMaker image. A SageMaker image is a set of image versions. Each /// image version represents a container image stored in Amazon Container Registry (ECR). /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html">Bring /// your own SageMaker image</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateImage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateImage">REST API Reference for CreateImage Operation</seealso> Task<CreateImageResponse> CreateImageAsync(CreateImageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateImageVersion /// <summary> /// Creates a version of the SageMaker image specified by <code>ImageName</code>. The /// version represents the Amazon Container Registry (ECR) container image specified by /// <code>BaseImage</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateImageVersion service method.</param> /// /// <returns>The response from the CreateImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateImageVersion">REST API Reference for CreateImageVersion Operation</seealso> CreateImageVersionResponse CreateImageVersion(CreateImageVersionRequest request); /// <summary> /// Creates a version of the SageMaker image specified by <code>ImageName</code>. The /// version represents the Amazon Container Registry (ECR) container image specified by /// <code>BaseImage</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateImageVersion service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateImageVersion">REST API Reference for CreateImageVersion Operation</seealso> Task<CreateImageVersionResponse> CreateImageVersionAsync(CreateImageVersionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateLabelingJob /// <summary> /// Creates a job that uses workers to label the data objects in your input dataset. You /// can use the labeled data to train machine learning models. /// /// /// <para> /// You can select your workforce from one of three providers: /// </para> /// <ul> <li> /// <para> /// A private workforce that you create. It can include employees, contractors, and outside /// experts. Use a private workforce when want the data to stay within your organization /// or when a specific set of skills is required. /// </para> /// </li> <li> /// <para> /// One or more vendors that you select from the Amazon Web Services Marketplace. Vendors /// provide expertise in specific areas. /// </para> /// </li> <li> /// <para> /// The Amazon Mechanical Turk workforce. This is the largest workforce, but it should /// only be used for public data or data that has been stripped of any personally identifiable /// information. /// </para> /// </li> </ul> /// <para> /// You can also use <i>automated data labeling</i> to reduce the number of data objects /// that need to be labeled by a human. Automated data labeling uses <i>active learning</i> /// to determine if a data object can be labeled by machine or if it needs to be sent /// to a human worker. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html">Using /// Automated Data Labeling</a>. /// </para> /// /// <para> /// The data objects to be labeled are contained in an Amazon S3 bucket. You create a /// <i>manifest file</i> that describes the location of each object. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-data.html">Using /// Input and Output Data</a>. /// </para> /// /// <para> /// The output can be used as the manifest file for another labeling job or as training /// data for your machine learning models. /// </para> /// /// <para> /// You can use this operation to create a static labeling job or a streaming labeling /// job. A static labeling job stops if all data objects in the input manifest file identified /// in <code>ManifestS3Uri</code> have been labeled. A streaming labeling job runs perpetually /// until it is manually stopped, or remains idle for 10 days. You can send new data objects /// to an active (<code>InProgress</code>) streaming labeling job in real time. To learn /// how to create a static labeling job, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-create-labeling-job-api.html">Create /// a Labeling Job (API) </a> in the Amazon SageMaker Developer Guide. To learn how to /// create a streaming labeling job, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-streaming-create-job.html">Create /// a Streaming Labeling Job</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateLabelingJob service method.</param> /// /// <returns>The response from the CreateLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob">REST API Reference for CreateLabelingJob Operation</seealso> CreateLabelingJobResponse CreateLabelingJob(CreateLabelingJobRequest request); /// <summary> /// Creates a job that uses workers to label the data objects in your input dataset. You /// can use the labeled data to train machine learning models. /// /// /// <para> /// You can select your workforce from one of three providers: /// </para> /// <ul> <li> /// <para> /// A private workforce that you create. It can include employees, contractors, and outside /// experts. Use a private workforce when want the data to stay within your organization /// or when a specific set of skills is required. /// </para> /// </li> <li> /// <para> /// One or more vendors that you select from the Amazon Web Services Marketplace. Vendors /// provide expertise in specific areas. /// </para> /// </li> <li> /// <para> /// The Amazon Mechanical Turk workforce. This is the largest workforce, but it should /// only be used for public data or data that has been stripped of any personally identifiable /// information. /// </para> /// </li> </ul> /// <para> /// You can also use <i>automated data labeling</i> to reduce the number of data objects /// that need to be labeled by a human. Automated data labeling uses <i>active learning</i> /// to determine if a data object can be labeled by machine or if it needs to be sent /// to a human worker. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html">Using /// Automated Data Labeling</a>. /// </para> /// /// <para> /// The data objects to be labeled are contained in an Amazon S3 bucket. You create a /// <i>manifest file</i> that describes the location of each object. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-data.html">Using /// Input and Output Data</a>. /// </para> /// /// <para> /// The output can be used as the manifest file for another labeling job or as training /// data for your machine learning models. /// </para> /// /// <para> /// You can use this operation to create a static labeling job or a streaming labeling /// job. A static labeling job stops if all data objects in the input manifest file identified /// in <code>ManifestS3Uri</code> have been labeled. A streaming labeling job runs perpetually /// until it is manually stopped, or remains idle for 10 days. You can send new data objects /// to an active (<code>InProgress</code>) streaming labeling job in real time. To learn /// how to create a static labeling job, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-create-labeling-job-api.html">Create /// a Labeling Job (API) </a> in the Amazon SageMaker Developer Guide. To learn how to /// create a streaming labeling job, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-streaming-create-job.html">Create /// a Streaming Labeling Job</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateLabelingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob">REST API Reference for CreateLabelingJob Operation</seealso> Task<CreateLabelingJobResponse> CreateLabelingJobAsync(CreateLabelingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModel /// <summary> /// Creates a model in Amazon SageMaker. In the request, you name the model and describe /// a primary container. For the primary container, you specify the Docker image that /// contains inference code, artifacts (from prior training), and a custom environment /// map that the inference code uses when you deploy the model for predictions. /// /// /// <para> /// Use this API to create a model if you want to use Amazon SageMaker hosting services /// or run a batch transform job. /// </para> /// /// <para> /// To host your model, you create an endpoint configuration with the <code>CreateEndpointConfig</code> /// API, and then create an endpoint with the <code>CreateEndpoint</code> API. Amazon /// SageMaker then deploys all of the containers that you defined for the model in the /// hosting environment. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html#ex1-deploy-model-boto">Deploy /// the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python /// (Boto 3)).</a> /// </para> /// /// <para> /// To run a batch transform using your model, you start a job with the <code>CreateTransformJob</code> /// API. Amazon SageMaker uses your model and your dataset to get inferences which are /// then saved to a specified S3 location. /// </para> /// /// <para> /// In the <code>CreateModel</code> request, you must define a container with the <code>PrimaryContainer</code> /// parameter. /// </para> /// /// <para> /// In the request, you also provide an IAM role that Amazon SageMaker can assume to access /// model artifacts and docker image for deployment on ML compute hosting instances or /// for batch transform jobs. In addition, you also use the IAM role to manage permissions /// the inference code needs. For example, if the inference code access any other Amazon /// Web Services resources, you grant necessary permissions via this role. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModel service method.</param> /// /// <returns>The response from the CreateModel service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel">REST API Reference for CreateModel Operation</seealso> CreateModelResponse CreateModel(CreateModelRequest request); /// <summary> /// Creates a model in Amazon SageMaker. In the request, you name the model and describe /// a primary container. For the primary container, you specify the Docker image that /// contains inference code, artifacts (from prior training), and a custom environment /// map that the inference code uses when you deploy the model for predictions. /// /// /// <para> /// Use this API to create a model if you want to use Amazon SageMaker hosting services /// or run a batch transform job. /// </para> /// /// <para> /// To host your model, you create an endpoint configuration with the <code>CreateEndpointConfig</code> /// API, and then create an endpoint with the <code>CreateEndpoint</code> API. Amazon /// SageMaker then deploys all of the containers that you defined for the model in the /// hosting environment. /// </para> /// /// <para> /// For an example that calls this method when deploying a model to Amazon SageMaker hosting /// services, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html#ex1-deploy-model-boto">Deploy /// the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python /// (Boto 3)).</a> /// </para> /// /// <para> /// To run a batch transform using your model, you start a job with the <code>CreateTransformJob</code> /// API. Amazon SageMaker uses your model and your dataset to get inferences which are /// then saved to a specified S3 location. /// </para> /// /// <para> /// In the <code>CreateModel</code> request, you must define a container with the <code>PrimaryContainer</code> /// parameter. /// </para> /// /// <para> /// In the request, you also provide an IAM role that Amazon SageMaker can assume to access /// model artifacts and docker image for deployment on ML compute hosting instances or /// for batch transform jobs. In addition, you also use the IAM role to manage permissions /// the inference code needs. For example, if the inference code access any other Amazon /// Web Services resources, you grant necessary permissions via this role. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModel service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModel service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel">REST API Reference for CreateModel Operation</seealso> Task<CreateModelResponse> CreateModelAsync(CreateModelRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModelBiasJobDefinition /// <summary> /// Creates the definition for a model bias job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelBiasJobDefinition service method.</param> /// /// <returns>The response from the CreateModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelBiasJobDefinition">REST API Reference for CreateModelBiasJobDefinition Operation</seealso> CreateModelBiasJobDefinitionResponse CreateModelBiasJobDefinition(CreateModelBiasJobDefinitionRequest request); /// <summary> /// Creates the definition for a model bias job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelBiasJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelBiasJobDefinition">REST API Reference for CreateModelBiasJobDefinition Operation</seealso> Task<CreateModelBiasJobDefinitionResponse> CreateModelBiasJobDefinitionAsync(CreateModelBiasJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModelExplainabilityJobDefinition /// <summary> /// Creates the definition for a model explainability job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelExplainabilityJobDefinition service method.</param> /// /// <returns>The response from the CreateModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelExplainabilityJobDefinition">REST API Reference for CreateModelExplainabilityJobDefinition Operation</seealso> CreateModelExplainabilityJobDefinitionResponse CreateModelExplainabilityJobDefinition(CreateModelExplainabilityJobDefinitionRequest request); /// <summary> /// Creates the definition for a model explainability job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelExplainabilityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelExplainabilityJobDefinition">REST API Reference for CreateModelExplainabilityJobDefinition Operation</seealso> Task<CreateModelExplainabilityJobDefinitionResponse> CreateModelExplainabilityJobDefinitionAsync(CreateModelExplainabilityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModelPackage /// <summary> /// Creates a model package that you can use to create Amazon SageMaker models or list /// on Amazon Web Services Marketplace, or a versioned model that is part of a model group. /// Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to /// create models in Amazon SageMaker. /// /// /// <para> /// To create a model package by specifying a Docker container that contains your inference /// code and the Amazon S3 location of your model artifacts, provide values for <code>InferenceSpecification</code>. /// To create a model from an algorithm resource that you created or subscribed to in /// Amazon Web Services Marketplace, provide a value for <code>SourceAlgorithmSpecification</code>. /// </para> /// <note> /// <para> /// There are two types of model packages: /// </para> /// <ul> <li> /// <para> /// Versioned - a model that is part of a model group in the model registry. /// </para> /// </li> <li> /// <para> /// Unversioned - a model package that is not part of a model group. /// </para> /// </li> </ul> </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelPackage service method.</param> /// /// <returns>The response from the CreateModelPackage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage">REST API Reference for CreateModelPackage Operation</seealso> CreateModelPackageResponse CreateModelPackage(CreateModelPackageRequest request); /// <summary> /// Creates a model package that you can use to create Amazon SageMaker models or list /// on Amazon Web Services Marketplace, or a versioned model that is part of a model group. /// Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to /// create models in Amazon SageMaker. /// /// /// <para> /// To create a model package by specifying a Docker container that contains your inference /// code and the Amazon S3 location of your model artifacts, provide values for <code>InferenceSpecification</code>. /// To create a model from an algorithm resource that you created or subscribed to in /// Amazon Web Services Marketplace, provide a value for <code>SourceAlgorithmSpecification</code>. /// </para> /// <note> /// <para> /// There are two types of model packages: /// </para> /// <ul> <li> /// <para> /// Versioned - a model that is part of a model group in the model registry. /// </para> /// </li> <li> /// <para> /// Unversioned - a model package that is not part of a model group. /// </para> /// </li> </ul> </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelPackage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModelPackage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage">REST API Reference for CreateModelPackage Operation</seealso> Task<CreateModelPackageResponse> CreateModelPackageAsync(CreateModelPackageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModelPackageGroup /// <summary> /// Creates a model group. A model group contains a group of model versions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelPackageGroup service method.</param> /// /// <returns>The response from the CreateModelPackageGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackageGroup">REST API Reference for CreateModelPackageGroup Operation</seealso> CreateModelPackageGroupResponse CreateModelPackageGroup(CreateModelPackageGroupRequest request); /// <summary> /// Creates a model group. A model group contains a group of model versions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelPackageGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModelPackageGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackageGroup">REST API Reference for CreateModelPackageGroup Operation</seealso> Task<CreateModelPackageGroupResponse> CreateModelPackageGroupAsync(CreateModelPackageGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateModelQualityJobDefinition /// <summary> /// Creates a definition for a job that monitors model quality and drift. For information /// about model monitor, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html">Amazon /// SageMaker Model Monitor</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelQualityJobDefinition service method.</param> /// /// <returns>The response from the CreateModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelQualityJobDefinition">REST API Reference for CreateModelQualityJobDefinition Operation</seealso> CreateModelQualityJobDefinitionResponse CreateModelQualityJobDefinition(CreateModelQualityJobDefinitionRequest request); /// <summary> /// Creates a definition for a job that monitors model quality and drift. For information /// about model monitor, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html">Amazon /// SageMaker Model Monitor</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateModelQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelQualityJobDefinition">REST API Reference for CreateModelQualityJobDefinition Operation</seealso> Task<CreateModelQualityJobDefinitionResponse> CreateModelQualityJobDefinitionAsync(CreateModelQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateMonitoringSchedule /// <summary> /// Creates a schedule that regularly starts Amazon SageMaker Processing Jobs to monitor /// the data captured for an Amazon SageMaker Endoint. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateMonitoringSchedule service method.</param> /// /// <returns>The response from the CreateMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateMonitoringSchedule">REST API Reference for CreateMonitoringSchedule Operation</seealso> CreateMonitoringScheduleResponse CreateMonitoringSchedule(CreateMonitoringScheduleRequest request); /// <summary> /// Creates a schedule that regularly starts Amazon SageMaker Processing Jobs to monitor /// the data captured for an Amazon SageMaker Endoint. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateMonitoringSchedule">REST API Reference for CreateMonitoringSchedule Operation</seealso> Task<CreateMonitoringScheduleResponse> CreateMonitoringScheduleAsync(CreateMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateNotebookInstance /// <summary> /// Creates an Amazon SageMaker notebook instance. A notebook instance is a machine learning /// (ML) compute instance running on a Jupyter notebook. /// /// /// <para> /// In a <code>CreateNotebookInstance</code> request, specify the type of ML compute instance /// that you want to run. Amazon SageMaker launches the instance, installs common libraries /// that you can use to explore datasets for model training, and attaches an ML storage /// volume to the notebook instance. /// </para> /// /// <para> /// Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates /// how to use Amazon SageMaker with a specific algorithm or with a machine learning framework. /// /// </para> /// /// <para> /// After receiving the request, Amazon SageMaker does the following: /// </para> /// <ol> <li> /// <para> /// Creates a network interface in the Amazon SageMaker VPC. /// </para> /// </li> <li> /// <para> /// (Option) If you specified <code>SubnetId</code>, Amazon SageMaker creates a network /// interface in your own VPC, which is inferred from the subnet ID that you provide in /// the input. When creating this network interface, Amazon SageMaker attaches the security /// group that you specified in the request to the network interface that it creates in /// your VPC. /// </para> /// </li> <li> /// <para> /// Launches an EC2 instance of the type specified in the request in the Amazon SageMaker /// VPC. If you specified <code>SubnetId</code> of your VPC, Amazon SageMaker specifies /// both network interfaces when launching this instance. This enables inbound traffic /// from your own VPC to the notebook instance, assuming that the security groups allow /// it. /// </para> /// </li> </ol> /// <para> /// After creating the notebook instance, Amazon SageMaker returns its Amazon Resource /// Name (ARN). You can't change the name of a notebook instance after you create it. /// </para> /// /// <para> /// After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter /// server and work in Jupyter notebooks. For example, you can write code to explore a /// dataset that you can use for model training, train a model, host models by creating /// Amazon SageMaker endpoints, and validate hosted models. /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How /// It Works</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateNotebookInstance service method.</param> /// /// <returns>The response from the CreateNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance">REST API Reference for CreateNotebookInstance Operation</seealso> CreateNotebookInstanceResponse CreateNotebookInstance(CreateNotebookInstanceRequest request); /// <summary> /// Creates an Amazon SageMaker notebook instance. A notebook instance is a machine learning /// (ML) compute instance running on a Jupyter notebook. /// /// /// <para> /// In a <code>CreateNotebookInstance</code> request, specify the type of ML compute instance /// that you want to run. Amazon SageMaker launches the instance, installs common libraries /// that you can use to explore datasets for model training, and attaches an ML storage /// volume to the notebook instance. /// </para> /// /// <para> /// Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates /// how to use Amazon SageMaker with a specific algorithm or with a machine learning framework. /// /// </para> /// /// <para> /// After receiving the request, Amazon SageMaker does the following: /// </para> /// <ol> <li> /// <para> /// Creates a network interface in the Amazon SageMaker VPC. /// </para> /// </li> <li> /// <para> /// (Option) If you specified <code>SubnetId</code>, Amazon SageMaker creates a network /// interface in your own VPC, which is inferred from the subnet ID that you provide in /// the input. When creating this network interface, Amazon SageMaker attaches the security /// group that you specified in the request to the network interface that it creates in /// your VPC. /// </para> /// </li> <li> /// <para> /// Launches an EC2 instance of the type specified in the request in the Amazon SageMaker /// VPC. If you specified <code>SubnetId</code> of your VPC, Amazon SageMaker specifies /// both network interfaces when launching this instance. This enables inbound traffic /// from your own VPC to the notebook instance, assuming that the security groups allow /// it. /// </para> /// </li> </ol> /// <para> /// After creating the notebook instance, Amazon SageMaker returns its Amazon Resource /// Name (ARN). You can't change the name of a notebook instance after you create it. /// </para> /// /// <para> /// After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter /// server and work in Jupyter notebooks. For example, you can write code to explore a /// dataset that you can use for model training, train a model, host models by creating /// Amazon SageMaker endpoints, and validate hosted models. /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How /// It Works</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance">REST API Reference for CreateNotebookInstance Operation</seealso> Task<CreateNotebookInstanceResponse> CreateNotebookInstanceAsync(CreateNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateNotebookInstanceLifecycleConfig /// <summary> /// Creates a lifecycle configuration that you can associate with a notebook instance. /// A <i>lifecycle configuration</i> is a collection of shell scripts that run when you /// create or start a notebook instance. /// /// /// <para> /// Each lifecycle configuration script has a limit of 16384 characters. /// </para> /// /// <para> /// The value of the <code>$PATH</code> environment variable that is available to both /// scripts is <code>/sbin:bin:/usr/sbin:/usr/bin</code>. /// </para> /// /// <para> /// View CloudWatch Logs for notebook instance lifecycle configurations in log group <code>/aws/sagemaker/NotebookInstances</code> /// in log stream <code>[notebook-instance-name]/[LifecycleConfigHook]</code>. /// </para> /// /// <para> /// Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script /// runs for longer than 5 minutes, it fails and the notebook instance is not created /// or started. /// </para> /// /// <para> /// For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step /// 2.1: (Optional) Customize a Notebook Instance</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateNotebookInstanceLifecycleConfig service method.</param> /// /// <returns>The response from the CreateNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig">REST API Reference for CreateNotebookInstanceLifecycleConfig Operation</seealso> CreateNotebookInstanceLifecycleConfigResponse CreateNotebookInstanceLifecycleConfig(CreateNotebookInstanceLifecycleConfigRequest request); /// <summary> /// Creates a lifecycle configuration that you can associate with a notebook instance. /// A <i>lifecycle configuration</i> is a collection of shell scripts that run when you /// create or start a notebook instance. /// /// /// <para> /// Each lifecycle configuration script has a limit of 16384 characters. /// </para> /// /// <para> /// The value of the <code>$PATH</code> environment variable that is available to both /// scripts is <code>/sbin:bin:/usr/sbin:/usr/bin</code>. /// </para> /// /// <para> /// View CloudWatch Logs for notebook instance lifecycle configurations in log group <code>/aws/sagemaker/NotebookInstances</code> /// in log stream <code>[notebook-instance-name]/[LifecycleConfigHook]</code>. /// </para> /// /// <para> /// Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script /// runs for longer than 5 minutes, it fails and the notebook instance is not created /// or started. /// </para> /// /// <para> /// For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step /// 2.1: (Optional) Customize a Notebook Instance</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateNotebookInstanceLifecycleConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig">REST API Reference for CreateNotebookInstanceLifecycleConfig Operation</seealso> Task<CreateNotebookInstanceLifecycleConfigResponse> CreateNotebookInstanceLifecycleConfigAsync(CreateNotebookInstanceLifecycleConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreatePipeline /// <summary> /// Creates a pipeline using a JSON pipeline definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePipeline service method.</param> /// /// <returns>The response from the CreatePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePipeline">REST API Reference for CreatePipeline Operation</seealso> CreatePipelineResponse CreatePipeline(CreatePipelineRequest request); /// <summary> /// Creates a pipeline using a JSON pipeline definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePipeline service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreatePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePipeline">REST API Reference for CreatePipeline Operation</seealso> Task<CreatePipelineResponse> CreatePipelineAsync(CreatePipelineRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreatePresignedDomainUrl /// <summary> /// Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, /// the user will be automatically signed in to Amazon SageMaker Studio, and granted access /// to all of the Apps and files associated with the Domain's Amazon Elastic File System /// (EFS) volume. This operation can only be called when the authentication mode equals /// IAM. /// /// /// <para> /// The IAM role or user used to call this API defines the permissions to access the app. /// Once the presigned URL is created, no additional permission is required to access /// this URL. IAM authorization policies for this API are also enforced for every HTTP /// request and WebSocket frame that attempts to connect to the app. /// </para> /// /// <para> /// You can restrict access to this API and to the URL that it returns to a list of IP /// addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-interface-endpoint.html">Connect /// to SageMaker Studio Through an Interface VPC Endpoint</a> . /// </para> /// <note> /// <para> /// The URL that you get from a call to <code>CreatePresignedDomainUrl</code> has a default /// timeout of 5 minutes. You can configure this value using <code>ExpiresInSeconds</code>. /// If you try to use the URL after the timeout limit expires, you are directed to the /// Amazon Web Services console sign-in page. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePresignedDomainUrl service method.</param> /// /// <returns>The response from the CreatePresignedDomainUrl service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedDomainUrl">REST API Reference for CreatePresignedDomainUrl Operation</seealso> CreatePresignedDomainUrlResponse CreatePresignedDomainUrl(CreatePresignedDomainUrlRequest request); /// <summary> /// Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, /// the user will be automatically signed in to Amazon SageMaker Studio, and granted access /// to all of the Apps and files associated with the Domain's Amazon Elastic File System /// (EFS) volume. This operation can only be called when the authentication mode equals /// IAM. /// /// /// <para> /// The IAM role or user used to call this API defines the permissions to access the app. /// Once the presigned URL is created, no additional permission is required to access /// this URL. IAM authorization policies for this API are also enforced for every HTTP /// request and WebSocket frame that attempts to connect to the app. /// </para> /// /// <para> /// You can restrict access to this API and to the URL that it returns to a list of IP /// addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, /// see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/studio-interface-endpoint.html">Connect /// to SageMaker Studio Through an Interface VPC Endpoint</a> . /// </para> /// <note> /// <para> /// The URL that you get from a call to <code>CreatePresignedDomainUrl</code> has a default /// timeout of 5 minutes. You can configure this value using <code>ExpiresInSeconds</code>. /// If you try to use the URL after the timeout limit expires, you are directed to the /// Amazon Web Services console sign-in page. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePresignedDomainUrl service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreatePresignedDomainUrl service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedDomainUrl">REST API Reference for CreatePresignedDomainUrl Operation</seealso> Task<CreatePresignedDomainUrlResponse> CreatePresignedDomainUrlAsync(CreatePresignedDomainUrlRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreatePresignedNotebookInstanceUrl /// <summary> /// Returns a URL that you can use to connect to the Jupyter server from a notebook instance. /// In the Amazon SageMaker console, when you choose <code>Open</code> next to a notebook /// instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from /// the notebook instance. The console uses this API to get the URL and show the page. /// /// /// <para> /// The IAM role or user used to call this API defines the permissions to access the /// notebook instance. Once the presigned URL is created, no additional permission is /// required to access this URL. IAM authorization policies for this API are also enforced /// for every HTTP request and WebSocket frame that attempts to connect to the notebook /// instance. /// </para> /// /// <para> /// You can restrict access to this API and to the URL that it returns to a list of IP /// addresses that you specify. Use the <code>NotIpAddress</code> condition operator and /// the <code>aws:SourceIP</code> condition context key to specify the list of IP addresses /// that you want to have access to the notebook instance. For more information, see <a /// href="https://docs.aws.amazon.com/sagemaker/latest/dg/security_iam_id-based-policy-examples.html#nbi-ip-filter">Limit /// Access to a Notebook Instance by IP Address</a>. /// </para> /// <note> /// <para> /// The URL that you get from a call to <a>CreatePresignedNotebookInstanceUrl</a> is valid /// only for 5 minutes. If you try to use the URL after the 5-minute limit expires, you /// are directed to the Amazon Web Services console sign-in page. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePresignedNotebookInstanceUrl service method.</param> /// /// <returns>The response from the CreatePresignedNotebookInstanceUrl service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl">REST API Reference for CreatePresignedNotebookInstanceUrl Operation</seealso> CreatePresignedNotebookInstanceUrlResponse CreatePresignedNotebookInstanceUrl(CreatePresignedNotebookInstanceUrlRequest request); /// <summary> /// Returns a URL that you can use to connect to the Jupyter server from a notebook instance. /// In the Amazon SageMaker console, when you choose <code>Open</code> next to a notebook /// instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from /// the notebook instance. The console uses this API to get the URL and show the page. /// /// /// <para> /// The IAM role or user used to call this API defines the permissions to access the /// notebook instance. Once the presigned URL is created, no additional permission is /// required to access this URL. IAM authorization policies for this API are also enforced /// for every HTTP request and WebSocket frame that attempts to connect to the notebook /// instance. /// </para> /// /// <para> /// You can restrict access to this API and to the URL that it returns to a list of IP /// addresses that you specify. Use the <code>NotIpAddress</code> condition operator and /// the <code>aws:SourceIP</code> condition context key to specify the list of IP addresses /// that you want to have access to the notebook instance. For more information, see <a /// href="https://docs.aws.amazon.com/sagemaker/latest/dg/security_iam_id-based-policy-examples.html#nbi-ip-filter">Limit /// Access to a Notebook Instance by IP Address</a>. /// </para> /// <note> /// <para> /// The URL that you get from a call to <a>CreatePresignedNotebookInstanceUrl</a> is valid /// only for 5 minutes. If you try to use the URL after the 5-minute limit expires, you /// are directed to the Amazon Web Services console sign-in page. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreatePresignedNotebookInstanceUrl service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreatePresignedNotebookInstanceUrl service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl">REST API Reference for CreatePresignedNotebookInstanceUrl Operation</seealso> Task<CreatePresignedNotebookInstanceUrlResponse> CreatePresignedNotebookInstanceUrlAsync(CreatePresignedNotebookInstanceUrlRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateProcessingJob /// <summary> /// Creates a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateProcessingJob service method.</param> /// /// <returns>The response from the CreateProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateProcessingJob">REST API Reference for CreateProcessingJob Operation</seealso> CreateProcessingJobResponse CreateProcessingJob(CreateProcessingJobRequest request); /// <summary> /// Creates a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateProcessingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateProcessingJob">REST API Reference for CreateProcessingJob Operation</seealso> Task<CreateProcessingJobResponse> CreateProcessingJobAsync(CreateProcessingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateProject /// <summary> /// Creates a machine learning (ML) project that can contain one or more templates that /// set up an ML pipeline from training to deploying an approved model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateProject service method.</param> /// /// <returns>The response from the CreateProject service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateProject">REST API Reference for CreateProject Operation</seealso> CreateProjectResponse CreateProject(CreateProjectRequest request); /// <summary> /// Creates a machine learning (ML) project that can contain one or more templates that /// set up an ML pipeline from training to deploying an approved model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateProject service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateProject service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateProject">REST API Reference for CreateProject Operation</seealso> Task<CreateProjectResponse> CreateProjectAsync(CreateProjectRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateTrainingJob /// <summary> /// Starts a model training job. After training completes, Amazon SageMaker saves the /// resulting model artifacts to an Amazon S3 location that you specify. /// /// /// <para> /// If you choose to host your model using Amazon SageMaker hosting services, you can /// use the resulting model artifacts as part of the model. You can also use the artifacts /// in a machine learning service other than Amazon SageMaker, provided that you know /// how to use them for inference. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// <code>AlgorithmSpecification</code> - Identifies the training algorithm to use. /// </para> /// </li> <li> /// <para> /// <code>HyperParameters</code> - Specify these algorithm-specific parameters to enable /// the estimation of model parameters during training. Hyperparameters can be tuned to /// optimize this learning process. For a list of hyperparameters for each training algorithm /// provided by Amazon SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. /// /// </para> /// </li> <li> /// <para> /// <code>InputDataConfig</code> - Describes the training dataset and the Amazon S3, /// EFS, or FSx location where it is stored. /// </para> /// </li> <li> /// <para> /// <code>OutputDataConfig</code> - Identifies the Amazon S3 bucket where you want Amazon /// SageMaker to save the results of model training. /// </para> /// </li> <li> /// <para> /// <code>ResourceConfig</code> - Identifies the resources, ML compute instances, and /// ML storage volumes to deploy for model training. In distributed training, you specify /// more than one instance. /// </para> /// </li> <li> /// <para> /// <code>EnableManagedSpotTraining</code> - Optimize the cost of training machine learning /// models by up to 80% by using Amazon EC2 Spot instances. For more information, see /// <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html">Managed /// Spot Training</a>. /// </para> /// </li> <li> /// <para> /// <code>RoleArn</code> - The Amazon Resource Name (ARN) that Amazon SageMaker assumes /// to perform tasks on your behalf during model training. You must grant this role the /// necessary permissions so that Amazon SageMaker can successfully complete model training. /// /// </para> /// </li> <li> /// <para> /// <code>StoppingCondition</code> - To help cap training costs, use <code>MaxRuntimeInSeconds</code> /// to set a time limit for training. Use <code>MaxWaitTimeInSeconds</code> to specify /// how long a managed spot training job has to complete. /// </para> /// </li> <li> /// <para> /// <code>Environment</code> - The environment variables to set in the Docker container. /// </para> /// </li> <li> /// <para> /// <code>RetryStrategy</code> - The number of times to retry the job when the job fails /// due to an <code>InternalServerError</code>. /// </para> /// </li> </ul> /// <para> /// For more information about Amazon SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How /// It Works</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrainingJob service method.</param> /// /// <returns>The response from the CreateTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob">REST API Reference for CreateTrainingJob Operation</seealso> CreateTrainingJobResponse CreateTrainingJob(CreateTrainingJobRequest request); /// <summary> /// Starts a model training job. After training completes, Amazon SageMaker saves the /// resulting model artifacts to an Amazon S3 location that you specify. /// /// /// <para> /// If you choose to host your model using Amazon SageMaker hosting services, you can /// use the resulting model artifacts as part of the model. You can also use the artifacts /// in a machine learning service other than Amazon SageMaker, provided that you know /// how to use them for inference. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// <code>AlgorithmSpecification</code> - Identifies the training algorithm to use. /// </para> /// </li> <li> /// <para> /// <code>HyperParameters</code> - Specify these algorithm-specific parameters to enable /// the estimation of model parameters during training. Hyperparameters can be tuned to /// optimize this learning process. For a list of hyperparameters for each training algorithm /// provided by Amazon SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. /// /// </para> /// </li> <li> /// <para> /// <code>InputDataConfig</code> - Describes the training dataset and the Amazon S3, /// EFS, or FSx location where it is stored. /// </para> /// </li> <li> /// <para> /// <code>OutputDataConfig</code> - Identifies the Amazon S3 bucket where you want Amazon /// SageMaker to save the results of model training. /// </para> /// </li> <li> /// <para> /// <code>ResourceConfig</code> - Identifies the resources, ML compute instances, and /// ML storage volumes to deploy for model training. In distributed training, you specify /// more than one instance. /// </para> /// </li> <li> /// <para> /// <code>EnableManagedSpotTraining</code> - Optimize the cost of training machine learning /// models by up to 80% by using Amazon EC2 Spot instances. For more information, see /// <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html">Managed /// Spot Training</a>. /// </para> /// </li> <li> /// <para> /// <code>RoleArn</code> - The Amazon Resource Name (ARN) that Amazon SageMaker assumes /// to perform tasks on your behalf during model training. You must grant this role the /// necessary permissions so that Amazon SageMaker can successfully complete model training. /// /// </para> /// </li> <li> /// <para> /// <code>StoppingCondition</code> - To help cap training costs, use <code>MaxRuntimeInSeconds</code> /// to set a time limit for training. Use <code>MaxWaitTimeInSeconds</code> to specify /// how long a managed spot training job has to complete. /// </para> /// </li> <li> /// <para> /// <code>Environment</code> - The environment variables to set in the Docker container. /// </para> /// </li> <li> /// <para> /// <code>RetryStrategy</code> - The number of times to retry the job when the job fails /// due to an <code>InternalServerError</code>. /// </para> /// </li> </ul> /// <para> /// For more information about Amazon SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How /// It Works</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrainingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob">REST API Reference for CreateTrainingJob Operation</seealso> Task<CreateTrainingJobResponse> CreateTrainingJobAsync(CreateTrainingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateTransformJob /// <summary> /// Starts a transform job. A transform job uses a trained model to get inferences on /// a dataset and saves these results to an Amazon S3 location that you specify. /// /// /// <para> /// To perform batch transformations, you create a transform job and use the data that /// you have readily available. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// <code>TransformJobName</code> - Identifies the transform job. The name must be unique /// within an Amazon Web Services Region in an Amazon Web Services account. /// </para> /// </li> <li> /// <para> /// <code>ModelName</code> - Identifies the model to use. <code>ModelName</code> must /// be the name of an existing Amazon SageMaker model in the same Amazon Web Services /// Region and Amazon Web Services account. For information on creating a model, see <a>CreateModel</a>. /// </para> /// </li> <li> /// <para> /// <code>TransformInput</code> - Describes the dataset to be transformed and the Amazon /// S3 location where it is stored. /// </para> /// </li> <li> /// <para> /// <code>TransformOutput</code> - Identifies the Amazon S3 location where you want Amazon /// SageMaker to save the results from the transform job. /// </para> /// </li> <li> /// <para> /// <code>TransformResources</code> - Identifies the ML compute instances for the transform /// job. /// </para> /// </li> </ul> /// <para> /// For more information about how batch transformation works, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html">Batch /// Transform</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTransformJob service method.</param> /// /// <returns>The response from the CreateTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob">REST API Reference for CreateTransformJob Operation</seealso> CreateTransformJobResponse CreateTransformJob(CreateTransformJobRequest request); /// <summary> /// Starts a transform job. A transform job uses a trained model to get inferences on /// a dataset and saves these results to an Amazon S3 location that you specify. /// /// /// <para> /// To perform batch transformations, you create a transform job and use the data that /// you have readily available. /// </para> /// /// <para> /// In the request body, you provide the following: /// </para> /// <ul> <li> /// <para> /// <code>TransformJobName</code> - Identifies the transform job. The name must be unique /// within an Amazon Web Services Region in an Amazon Web Services account. /// </para> /// </li> <li> /// <para> /// <code>ModelName</code> - Identifies the model to use. <code>ModelName</code> must /// be the name of an existing Amazon SageMaker model in the same Amazon Web Services /// Region and Amazon Web Services account. For information on creating a model, see <a>CreateModel</a>. /// </para> /// </li> <li> /// <para> /// <code>TransformInput</code> - Describes the dataset to be transformed and the Amazon /// S3 location where it is stored. /// </para> /// </li> <li> /// <para> /// <code>TransformOutput</code> - Identifies the Amazon S3 location where you want Amazon /// SageMaker to save the results from the transform job. /// </para> /// </li> <li> /// <para> /// <code>TransformResources</code> - Identifies the ML compute instances for the transform /// job. /// </para> /// </li> </ul> /// <para> /// For more information about how batch transformation works, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html">Batch /// Transform</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTransformJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob">REST API Reference for CreateTransformJob Operation</seealso> Task<CreateTransformJobResponse> CreateTransformJobAsync(CreateTransformJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateTrial /// <summary> /// Creates an SageMaker <i>trial</i>. A trial is a set of steps called <i>trial components</i> /// that produce a machine learning model. A trial is part of a single SageMaker <i>experiment</i>. /// /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to a trial and then use the <a>Search</a> API to search for the tags. /// </para> /// /// <para> /// To get a list of all your trials, call the <a>ListTrials</a> API. To view a trial's /// properties, call the <a>DescribeTrial</a> API. To create a trial component, call the /// <a>CreateTrialComponent</a> API. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrial service method.</param> /// /// <returns>The response from the CreateTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrial">REST API Reference for CreateTrial Operation</seealso> CreateTrialResponse CreateTrial(CreateTrialRequest request); /// <summary> /// Creates an SageMaker <i>trial</i>. A trial is a set of steps called <i>trial components</i> /// that produce a machine learning model. A trial is part of a single SageMaker <i>experiment</i>. /// /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to a trial and then use the <a>Search</a> API to search for the tags. /// </para> /// /// <para> /// To get a list of all your trials, call the <a>ListTrials</a> API. To view a trial's /// properties, call the <a>DescribeTrial</a> API. To create a trial component, call the /// <a>CreateTrialComponent</a> API. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrial service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrial">REST API Reference for CreateTrial Operation</seealso> Task<CreateTrialResponse> CreateTrialAsync(CreateTrialRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateTrialComponent /// <summary> /// Creates a <i>trial component</i>, which is a stage of a machine learning <i>trial</i>. /// A trial is composed of one or more trial components. A trial component can be used /// in multiple trials. /// /// /// <para> /// Trial components include pre-processing jobs, training jobs, and batch transform jobs. /// </para> /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to a trial component and then use the <a>Search</a> API to search /// for the tags. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrialComponent service method.</param> /// /// <returns>The response from the CreateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrialComponent">REST API Reference for CreateTrialComponent Operation</seealso> CreateTrialComponentResponse CreateTrialComponent(CreateTrialComponentRequest request); /// <summary> /// Creates a <i>trial component</i>, which is a stage of a machine learning <i>trial</i>. /// A trial is composed of one or more trial components. A trial component can be used /// in multiple trials. /// /// /// <para> /// Trial components include pre-processing jobs, training jobs, and batch transform jobs. /// </para> /// /// <para> /// When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, /// and trial components are automatically tracked, logged, and indexed. When you use /// the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided /// by the SDK. /// </para> /// /// <para> /// You can add tags to a trial component and then use the <a>Search</a> API to search /// for the tags. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrialComponent">REST API Reference for CreateTrialComponent Operation</seealso> Task<CreateTrialComponentResponse> CreateTrialComponentAsync(CreateTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateUserProfile /// <summary> /// Creates a user profile. A user profile represents a single user within a domain, and /// is the main way to reference a "person" for the purposes of sharing, reporting, and /// other user-oriented features. This entity is created when a user onboards to Amazon /// SageMaker Studio. If an administrator invites a person by email or imports them from /// SSO, a user profile is automatically created. A user profile is the primary holder /// of settings for an individual user and has a reference to the user's private Amazon /// Elastic File System (EFS) home directory. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateUserProfile service method.</param> /// /// <returns>The response from the CreateUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateUserProfile">REST API Reference for CreateUserProfile Operation</seealso> CreateUserProfileResponse CreateUserProfile(CreateUserProfileRequest request); /// <summary> /// Creates a user profile. A user profile represents a single user within a domain, and /// is the main way to reference a "person" for the purposes of sharing, reporting, and /// other user-oriented features. This entity is created when a user onboards to Amazon /// SageMaker Studio. If an administrator invites a person by email or imports them from /// SSO, a user profile is automatically created. A user profile is the primary holder /// of settings for an individual user and has a reference to the user's private Amazon /// Elastic File System (EFS) home directory. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateUserProfile service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateUserProfile">REST API Reference for CreateUserProfile Operation</seealso> Task<CreateUserProfileResponse> CreateUserProfileAsync(CreateUserProfileRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateWorkforce /// <summary> /// Use this operation to create a workforce. This operation will return an error if a /// workforce already exists in the Amazon Web Services Region that you specify. You can /// only create one workforce in each Amazon Web Services Region per Amazon Web Services /// account. /// /// /// <para> /// If you want to create a new workforce in an Amazon Web Services Region where a workforce /// already exists, use the API operation to delete the existing workforce and then use /// <code>CreateWorkforce</code> to create a new workforce. /// </para> /// /// <para> /// To create a private workforce using Amazon Cognito, you must specify a Cognito user /// pool in <code>CognitoConfig</code>. You can also create an Amazon Cognito workforce /// using the Amazon SageMaker console. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-create-private.html"> /// Create a Private Workforce (Amazon Cognito)</a>. /// </para> /// /// <para> /// To create a private workforce using your own OIDC Identity Provider (IdP), specify /// your IdP configuration in <code>OidcConfig</code>. Your OIDC IdP must support <i>groups</i> /// because groups are used by Ground Truth and Amazon A2I to create work teams. For more /// information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-create-private-oidc.html"> /// Create a Private Workforce (OIDC IdP)</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateWorkforce service method.</param> /// /// <returns>The response from the CreateWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkforce">REST API Reference for CreateWorkforce Operation</seealso> CreateWorkforceResponse CreateWorkforce(CreateWorkforceRequest request); /// <summary> /// Use this operation to create a workforce. This operation will return an error if a /// workforce already exists in the Amazon Web Services Region that you specify. You can /// only create one workforce in each Amazon Web Services Region per Amazon Web Services /// account. /// /// /// <para> /// If you want to create a new workforce in an Amazon Web Services Region where a workforce /// already exists, use the API operation to delete the existing workforce and then use /// <code>CreateWorkforce</code> to create a new workforce. /// </para> /// /// <para> /// To create a private workforce using Amazon Cognito, you must specify a Cognito user /// pool in <code>CognitoConfig</code>. You can also create an Amazon Cognito workforce /// using the Amazon SageMaker console. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-create-private.html"> /// Create a Private Workforce (Amazon Cognito)</a>. /// </para> /// /// <para> /// To create a private workforce using your own OIDC Identity Provider (IdP), specify /// your IdP configuration in <code>OidcConfig</code>. Your OIDC IdP must support <i>groups</i> /// because groups are used by Ground Truth and Amazon A2I to create work teams. For more /// information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-create-private-oidc.html"> /// Create a Private Workforce (OIDC IdP)</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateWorkforce service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkforce">REST API Reference for CreateWorkforce Operation</seealso> Task<CreateWorkforceResponse> CreateWorkforceAsync(CreateWorkforceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region CreateWorkteam /// <summary> /// Creates a new work team for labeling your data. A work team is defined by one or more /// Amazon Cognito user pools. You must first create the user pools before you can create /// a work team. /// /// /// <para> /// You cannot create more than 25 work teams in an account and region. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateWorkteam service method.</param> /// /// <returns>The response from the CreateWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam">REST API Reference for CreateWorkteam Operation</seealso> CreateWorkteamResponse CreateWorkteam(CreateWorkteamRequest request); /// <summary> /// Creates a new work team for labeling your data. A work team is defined by one or more /// Amazon Cognito user pools. You must first create the user pools before you can create /// a work team. /// /// /// <para> /// You cannot create more than 25 work teams in an account and region. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam">REST API Reference for CreateWorkteam Operation</seealso> Task<CreateWorkteamResponse> CreateWorkteamAsync(CreateWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteAction /// <summary> /// Deletes an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAction service method.</param> /// /// <returns>The response from the DeleteAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAction">REST API Reference for DeleteAction Operation</seealso> DeleteActionResponse DeleteAction(DeleteActionRequest request); /// <summary> /// Deletes an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAction service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAction">REST API Reference for DeleteAction Operation</seealso> Task<DeleteActionResponse> DeleteActionAsync(DeleteActionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteAlgorithm /// <summary> /// Removes the specified algorithm from your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAlgorithm service method.</param> /// /// <returns>The response from the DeleteAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm">REST API Reference for DeleteAlgorithm Operation</seealso> DeleteAlgorithmResponse DeleteAlgorithm(DeleteAlgorithmRequest request); /// <summary> /// Removes the specified algorithm from your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAlgorithm service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm">REST API Reference for DeleteAlgorithm Operation</seealso> Task<DeleteAlgorithmResponse> DeleteAlgorithmAsync(DeleteAlgorithmRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteApp /// <summary> /// Used to stop and delete an app. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteApp service method.</param> /// /// <returns>The response from the DeleteApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteApp">REST API Reference for DeleteApp Operation</seealso> DeleteAppResponse DeleteApp(DeleteAppRequest request); /// <summary> /// Used to stop and delete an app. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteApp service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteApp">REST API Reference for DeleteApp Operation</seealso> Task<DeleteAppResponse> DeleteAppAsync(DeleteAppRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteAppImageConfig /// <summary> /// Deletes an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAppImageConfig service method.</param> /// /// <returns>The response from the DeleteAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAppImageConfig">REST API Reference for DeleteAppImageConfig Operation</seealso> DeleteAppImageConfigResponse DeleteAppImageConfig(DeleteAppImageConfigRequest request); /// <summary> /// Deletes an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAppImageConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAppImageConfig">REST API Reference for DeleteAppImageConfig Operation</seealso> Task<DeleteAppImageConfigResponse> DeleteAppImageConfigAsync(DeleteAppImageConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteArtifact /// <summary> /// Deletes an artifact. Either <code>ArtifactArn</code> or <code>Source</code> must be /// specified. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteArtifact service method.</param> /// /// <returns>The response from the DeleteArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteArtifact">REST API Reference for DeleteArtifact Operation</seealso> DeleteArtifactResponse DeleteArtifact(DeleteArtifactRequest request); /// <summary> /// Deletes an artifact. Either <code>ArtifactArn</code> or <code>Source</code> must be /// specified. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteArtifact service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteArtifact">REST API Reference for DeleteArtifact Operation</seealso> Task<DeleteArtifactResponse> DeleteArtifactAsync(DeleteArtifactRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteAssociation /// <summary> /// Deletes an association. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAssociation service method.</param> /// /// <returns>The response from the DeleteAssociation service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAssociation">REST API Reference for DeleteAssociation Operation</seealso> DeleteAssociationResponse DeleteAssociation(DeleteAssociationRequest request); /// <summary> /// Deletes an association. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteAssociation service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteAssociation service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAssociation">REST API Reference for DeleteAssociation Operation</seealso> Task<DeleteAssociationResponse> DeleteAssociationAsync(DeleteAssociationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteCodeRepository /// <summary> /// Deletes the specified Git repository from your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteCodeRepository service method.</param> /// /// <returns>The response from the DeleteCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository">REST API Reference for DeleteCodeRepository Operation</seealso> DeleteCodeRepositoryResponse DeleteCodeRepository(DeleteCodeRepositoryRequest request); /// <summary> /// Deletes the specified Git repository from your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteCodeRepository service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository">REST API Reference for DeleteCodeRepository Operation</seealso> Task<DeleteCodeRepositoryResponse> DeleteCodeRepositoryAsync(DeleteCodeRepositoryRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteContext /// <summary> /// Deletes an context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteContext service method.</param> /// /// <returns>The response from the DeleteContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteContext">REST API Reference for DeleteContext Operation</seealso> DeleteContextResponse DeleteContext(DeleteContextRequest request); /// <summary> /// Deletes an context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteContext service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteContext">REST API Reference for DeleteContext Operation</seealso> Task<DeleteContextResponse> DeleteContextAsync(DeleteContextRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteDataQualityJobDefinition /// <summary> /// Deletes a data quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDataQualityJobDefinition service method.</param> /// /// <returns>The response from the DeleteDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDataQualityJobDefinition">REST API Reference for DeleteDataQualityJobDefinition Operation</seealso> DeleteDataQualityJobDefinitionResponse DeleteDataQualityJobDefinition(DeleteDataQualityJobDefinitionRequest request); /// <summary> /// Deletes a data quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDataQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDataQualityJobDefinition">REST API Reference for DeleteDataQualityJobDefinition Operation</seealso> Task<DeleteDataQualityJobDefinitionResponse> DeleteDataQualityJobDefinitionAsync(DeleteDataQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteDeviceFleet /// <summary> /// Deletes a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDeviceFleet service method.</param> /// /// <returns>The response from the DeleteDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDeviceFleet">REST API Reference for DeleteDeviceFleet Operation</seealso> DeleteDeviceFleetResponse DeleteDeviceFleet(DeleteDeviceFleetRequest request); /// <summary> /// Deletes a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDeviceFleet service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDeviceFleet">REST API Reference for DeleteDeviceFleet Operation</seealso> Task<DeleteDeviceFleetResponse> DeleteDeviceFleetAsync(DeleteDeviceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteDomain /// <summary> /// Used to delete a domain. If you onboarded with IAM mode, you will need to delete your /// domain to onboard again using SSO. Use with caution. All of the members of the domain /// will lose access to their EFS volume, including data, notebooks, and other artifacts. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDomain service method.</param> /// /// <returns>The response from the DeleteDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDomain">REST API Reference for DeleteDomain Operation</seealso> DeleteDomainResponse DeleteDomain(DeleteDomainRequest request); /// <summary> /// Used to delete a domain. If you onboarded with IAM mode, you will need to delete your /// domain to onboard again using SSO. Use with caution. All of the members of the domain /// will lose access to their EFS volume, including data, notebooks, and other artifacts. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteDomain service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteDomain">REST API Reference for DeleteDomain Operation</seealso> Task<DeleteDomainResponse> DeleteDomainAsync(DeleteDomainRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteEndpoint /// <summary> /// Deletes an endpoint. Amazon SageMaker frees up all of the resources that were deployed /// when the endpoint was created. /// /// /// <para> /// Amazon SageMaker retires any custom KMS key grants associated with the endpoint, meaning /// you don't need to use the <a href="http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html">RevokeGrant</a> /// API call. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteEndpoint service method.</param> /// /// <returns>The response from the DeleteEndpoint service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint">REST API Reference for DeleteEndpoint Operation</seealso> DeleteEndpointResponse DeleteEndpoint(DeleteEndpointRequest request); /// <summary> /// Deletes an endpoint. Amazon SageMaker frees up all of the resources that were deployed /// when the endpoint was created. /// /// /// <para> /// Amazon SageMaker retires any custom KMS key grants associated with the endpoint, meaning /// you don't need to use the <a href="http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html">RevokeGrant</a> /// API call. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteEndpoint service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteEndpoint service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint">REST API Reference for DeleteEndpoint Operation</seealso> Task<DeleteEndpointResponse> DeleteEndpointAsync(DeleteEndpointRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteEndpointConfig /// <summary> /// Deletes an endpoint configuration. The <code>DeleteEndpointConfig</code> API deletes /// only the specified configuration. It does not delete endpoints created using the configuration. /// /// /// /// <para> /// You must not delete an <code>EndpointConfig</code> in use by an endpoint that is live /// or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations /// are being performed on the endpoint. If you delete the <code>EndpointConfig</code> /// of an endpoint that is active or being created or updated you may lose visibility /// into the instance type the endpoint is using. The endpoint must be deleted in order /// to stop incurring charges. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteEndpointConfig service method.</param> /// /// <returns>The response from the DeleteEndpointConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig">REST API Reference for DeleteEndpointConfig Operation</seealso> DeleteEndpointConfigResponse DeleteEndpointConfig(DeleteEndpointConfigRequest request); /// <summary> /// Deletes an endpoint configuration. The <code>DeleteEndpointConfig</code> API deletes /// only the specified configuration. It does not delete endpoints created using the configuration. /// /// /// /// <para> /// You must not delete an <code>EndpointConfig</code> in use by an endpoint that is live /// or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations /// are being performed on the endpoint. If you delete the <code>EndpointConfig</code> /// of an endpoint that is active or being created or updated you may lose visibility /// into the instance type the endpoint is using. The endpoint must be deleted in order /// to stop incurring charges. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteEndpointConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteEndpointConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig">REST API Reference for DeleteEndpointConfig Operation</seealso> Task<DeleteEndpointConfigResponse> DeleteEndpointConfigAsync(DeleteEndpointConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteExperiment /// <summary> /// Deletes an SageMaker experiment. All trials associated with the experiment must be /// deleted first. Use the <a>ListTrials</a> API to get a list of the trials associated /// with the experiment. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteExperiment service method.</param> /// /// <returns>The response from the DeleteExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteExperiment">REST API Reference for DeleteExperiment Operation</seealso> DeleteExperimentResponse DeleteExperiment(DeleteExperimentRequest request); /// <summary> /// Deletes an SageMaker experiment. All trials associated with the experiment must be /// deleted first. Use the <a>ListTrials</a> API to get a list of the trials associated /// with the experiment. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteExperiment service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteExperiment">REST API Reference for DeleteExperiment Operation</seealso> Task<DeleteExperimentResponse> DeleteExperimentAsync(DeleteExperimentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteFeatureGroup /// <summary> /// Delete the <code>FeatureGroup</code> and any data that was written to the <code>OnlineStore</code> /// of the <code>FeatureGroup</code>. Data cannot be accessed from the <code>OnlineStore</code> /// immediately after <code>DeleteFeatureGroup</code> is called. /// /// /// <para> /// Data written into the <code>OfflineStore</code> will not be deleted. The Amazon Web /// Services Glue database and tables that are automatically created for your <code>OfflineStore</code> /// are not deleted. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteFeatureGroup service method.</param> /// /// <returns>The response from the DeleteFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteFeatureGroup">REST API Reference for DeleteFeatureGroup Operation</seealso> DeleteFeatureGroupResponse DeleteFeatureGroup(DeleteFeatureGroupRequest request); /// <summary> /// Delete the <code>FeatureGroup</code> and any data that was written to the <code>OnlineStore</code> /// of the <code>FeatureGroup</code>. Data cannot be accessed from the <code>OnlineStore</code> /// immediately after <code>DeleteFeatureGroup</code> is called. /// /// /// <para> /// Data written into the <code>OfflineStore</code> will not be deleted. The Amazon Web /// Services Glue database and tables that are automatically created for your <code>OfflineStore</code> /// are not deleted. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteFeatureGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteFeatureGroup">REST API Reference for DeleteFeatureGroup Operation</seealso> Task<DeleteFeatureGroupResponse> DeleteFeatureGroupAsync(DeleteFeatureGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteFlowDefinition /// <summary> /// Deletes the specified flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteFlowDefinition service method.</param> /// /// <returns>The response from the DeleteFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteFlowDefinition">REST API Reference for DeleteFlowDefinition Operation</seealso> DeleteFlowDefinitionResponse DeleteFlowDefinition(DeleteFlowDefinitionRequest request); /// <summary> /// Deletes the specified flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteFlowDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteFlowDefinition">REST API Reference for DeleteFlowDefinition Operation</seealso> Task<DeleteFlowDefinitionResponse> DeleteFlowDefinitionAsync(DeleteFlowDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteHumanTaskUi /// <summary> /// Use this operation to delete a human task user interface (worker task template). /// /// /// <para> /// To see a list of human task user interfaces (work task templates) in your account, /// use . When you delete a worker task template, it no longer appears when you call <code>ListHumanTaskUis</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteHumanTaskUi service method.</param> /// /// <returns>The response from the DeleteHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteHumanTaskUi">REST API Reference for DeleteHumanTaskUi Operation</seealso> DeleteHumanTaskUiResponse DeleteHumanTaskUi(DeleteHumanTaskUiRequest request); /// <summary> /// Use this operation to delete a human task user interface (worker task template). /// /// /// <para> /// To see a list of human task user interfaces (work task templates) in your account, /// use . When you delete a worker task template, it no longer appears when you call <code>ListHumanTaskUis</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteHumanTaskUi service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteHumanTaskUi">REST API Reference for DeleteHumanTaskUi Operation</seealso> Task<DeleteHumanTaskUiResponse> DeleteHumanTaskUiAsync(DeleteHumanTaskUiRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteImage /// <summary> /// Deletes a SageMaker image and all versions of the image. The container images aren't /// deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteImage service method.</param> /// /// <returns>The response from the DeleteImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteImage">REST API Reference for DeleteImage Operation</seealso> DeleteImageResponse DeleteImage(DeleteImageRequest request); /// <summary> /// Deletes a SageMaker image and all versions of the image. The container images aren't /// deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteImage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteImage">REST API Reference for DeleteImage Operation</seealso> Task<DeleteImageResponse> DeleteImageAsync(DeleteImageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteImageVersion /// <summary> /// Deletes a version of a SageMaker image. The container image the version represents /// isn't deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteImageVersion service method.</param> /// /// <returns>The response from the DeleteImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteImageVersion">REST API Reference for DeleteImageVersion Operation</seealso> DeleteImageVersionResponse DeleteImageVersion(DeleteImageVersionRequest request); /// <summary> /// Deletes a version of a SageMaker image. The container image the version represents /// isn't deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteImageVersion service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteImageVersion">REST API Reference for DeleteImageVersion Operation</seealso> Task<DeleteImageVersionResponse> DeleteImageVersionAsync(DeleteImageVersionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModel /// <summary> /// Deletes a model. The <code>DeleteModel</code> API deletes only the model entry that /// was created in Amazon SageMaker when you called the <code>CreateModel</code> API. /// It does not delete model artifacts, inference code, or the IAM role that you specified /// when creating the model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModel service method.</param> /// /// <returns>The response from the DeleteModel service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel">REST API Reference for DeleteModel Operation</seealso> DeleteModelResponse DeleteModel(DeleteModelRequest request); /// <summary> /// Deletes a model. The <code>DeleteModel</code> API deletes only the model entry that /// was created in Amazon SageMaker when you called the <code>CreateModel</code> API. /// It does not delete model artifacts, inference code, or the IAM role that you specified /// when creating the model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModel service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModel service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel">REST API Reference for DeleteModel Operation</seealso> Task<DeleteModelResponse> DeleteModelAsync(DeleteModelRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelBiasJobDefinition /// <summary> /// Deletes an Amazon SageMaker model bias job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelBiasJobDefinition service method.</param> /// /// <returns>The response from the DeleteModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelBiasJobDefinition">REST API Reference for DeleteModelBiasJobDefinition Operation</seealso> DeleteModelBiasJobDefinitionResponse DeleteModelBiasJobDefinition(DeleteModelBiasJobDefinitionRequest request); /// <summary> /// Deletes an Amazon SageMaker model bias job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelBiasJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelBiasJobDefinition">REST API Reference for DeleteModelBiasJobDefinition Operation</seealso> Task<DeleteModelBiasJobDefinitionResponse> DeleteModelBiasJobDefinitionAsync(DeleteModelBiasJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelExplainabilityJobDefinition /// <summary> /// Deletes an Amazon SageMaker model explainability job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelExplainabilityJobDefinition service method.</param> /// /// <returns>The response from the DeleteModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelExplainabilityJobDefinition">REST API Reference for DeleteModelExplainabilityJobDefinition Operation</seealso> DeleteModelExplainabilityJobDefinitionResponse DeleteModelExplainabilityJobDefinition(DeleteModelExplainabilityJobDefinitionRequest request); /// <summary> /// Deletes an Amazon SageMaker model explainability job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelExplainabilityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelExplainabilityJobDefinition">REST API Reference for DeleteModelExplainabilityJobDefinition Operation</seealso> Task<DeleteModelExplainabilityJobDefinitionResponse> DeleteModelExplainabilityJobDefinitionAsync(DeleteModelExplainabilityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelPackage /// <summary> /// Deletes a model package. /// /// /// <para> /// A model package is used to create Amazon SageMaker models or list on Amazon Web Services /// Marketplace. Buyers can subscribe to model packages listed on Amazon Web Services /// Marketplace to create models in Amazon SageMaker. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackage service method.</param> /// /// <returns>The response from the DeleteModelPackage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage">REST API Reference for DeleteModelPackage Operation</seealso> DeleteModelPackageResponse DeleteModelPackage(DeleteModelPackageRequest request); /// <summary> /// Deletes a model package. /// /// /// <para> /// A model package is used to create Amazon SageMaker models or list on Amazon Web Services /// Marketplace. Buyers can subscribe to model packages listed on Amazon Web Services /// Marketplace to create models in Amazon SageMaker. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelPackage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage">REST API Reference for DeleteModelPackage Operation</seealso> Task<DeleteModelPackageResponse> DeleteModelPackageAsync(DeleteModelPackageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelPackageGroup /// <summary> /// Deletes the specified model group. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackageGroup service method.</param> /// /// <returns>The response from the DeleteModelPackageGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackageGroup">REST API Reference for DeleteModelPackageGroup Operation</seealso> DeleteModelPackageGroupResponse DeleteModelPackageGroup(DeleteModelPackageGroupRequest request); /// <summary> /// Deletes the specified model group. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackageGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelPackageGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackageGroup">REST API Reference for DeleteModelPackageGroup Operation</seealso> Task<DeleteModelPackageGroupResponse> DeleteModelPackageGroupAsync(DeleteModelPackageGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelPackageGroupPolicy /// <summary> /// Deletes a model group resource policy. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackageGroupPolicy service method.</param> /// /// <returns>The response from the DeleteModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackageGroupPolicy">REST API Reference for DeleteModelPackageGroupPolicy Operation</seealso> DeleteModelPackageGroupPolicyResponse DeleteModelPackageGroupPolicy(DeleteModelPackageGroupPolicyRequest request); /// <summary> /// Deletes a model group resource policy. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelPackageGroupPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackageGroupPolicy">REST API Reference for DeleteModelPackageGroupPolicy Operation</seealso> Task<DeleteModelPackageGroupPolicyResponse> DeleteModelPackageGroupPolicyAsync(DeleteModelPackageGroupPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteModelQualityJobDefinition /// <summary> /// Deletes the secified model quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelQualityJobDefinition service method.</param> /// /// <returns>The response from the DeleteModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelQualityJobDefinition">REST API Reference for DeleteModelQualityJobDefinition Operation</seealso> DeleteModelQualityJobDefinitionResponse DeleteModelQualityJobDefinition(DeleteModelQualityJobDefinitionRequest request); /// <summary> /// Deletes the secified model quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteModelQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelQualityJobDefinition">REST API Reference for DeleteModelQualityJobDefinition Operation</seealso> Task<DeleteModelQualityJobDefinitionResponse> DeleteModelQualityJobDefinitionAsync(DeleteModelQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteMonitoringSchedule /// <summary> /// Deletes a monitoring schedule. Also stops the schedule had not already been stopped. /// This does not delete the job execution history of the monitoring schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteMonitoringSchedule service method.</param> /// /// <returns>The response from the DeleteMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteMonitoringSchedule">REST API Reference for DeleteMonitoringSchedule Operation</seealso> DeleteMonitoringScheduleResponse DeleteMonitoringSchedule(DeleteMonitoringScheduleRequest request); /// <summary> /// Deletes a monitoring schedule. Also stops the schedule had not already been stopped. /// This does not delete the job execution history of the monitoring schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteMonitoringSchedule">REST API Reference for DeleteMonitoringSchedule Operation</seealso> Task<DeleteMonitoringScheduleResponse> DeleteMonitoringScheduleAsync(DeleteMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteNotebookInstance /// <summary> /// Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook instance, /// you must call the <code>StopNotebookInstance</code> API. /// /// <important> /// <para> /// When you delete a notebook instance, you lose all of your data. Amazon SageMaker removes /// the ML compute instance, and deletes the ML storage volume and the network interface /// associated with the notebook instance. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteNotebookInstance service method.</param> /// /// <returns>The response from the DeleteNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance">REST API Reference for DeleteNotebookInstance Operation</seealso> DeleteNotebookInstanceResponse DeleteNotebookInstance(DeleteNotebookInstanceRequest request); /// <summary> /// Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook instance, /// you must call the <code>StopNotebookInstance</code> API. /// /// <important> /// <para> /// When you delete a notebook instance, you lose all of your data. Amazon SageMaker removes /// the ML compute instance, and deletes the ML storage volume and the network interface /// associated with the notebook instance. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance">REST API Reference for DeleteNotebookInstance Operation</seealso> Task<DeleteNotebookInstanceResponse> DeleteNotebookInstanceAsync(DeleteNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteNotebookInstanceLifecycleConfig /// <summary> /// Deletes a notebook instance lifecycle configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteNotebookInstanceLifecycleConfig service method.</param> /// /// <returns>The response from the DeleteNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig">REST API Reference for DeleteNotebookInstanceLifecycleConfig Operation</seealso> DeleteNotebookInstanceLifecycleConfigResponse DeleteNotebookInstanceLifecycleConfig(DeleteNotebookInstanceLifecycleConfigRequest request); /// <summary> /// Deletes a notebook instance lifecycle configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteNotebookInstanceLifecycleConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig">REST API Reference for DeleteNotebookInstanceLifecycleConfig Operation</seealso> Task<DeleteNotebookInstanceLifecycleConfigResponse> DeleteNotebookInstanceLifecycleConfigAsync(DeleteNotebookInstanceLifecycleConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeletePipeline /// <summary> /// Deletes a pipeline if there are no running instances of the pipeline. To delete a /// pipeline, you must stop all running instances of the pipeline using the <code>StopPipelineExecution</code> /// API. When you delete a pipeline, all instances of the pipeline are deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeletePipeline service method.</param> /// /// <returns>The response from the DeletePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeletePipeline">REST API Reference for DeletePipeline Operation</seealso> DeletePipelineResponse DeletePipeline(DeletePipelineRequest request); /// <summary> /// Deletes a pipeline if there are no running instances of the pipeline. To delete a /// pipeline, you must stop all running instances of the pipeline using the <code>StopPipelineExecution</code> /// API. When you delete a pipeline, all instances of the pipeline are deleted. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeletePipeline service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeletePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeletePipeline">REST API Reference for DeletePipeline Operation</seealso> Task<DeletePipelineResponse> DeletePipelineAsync(DeletePipelineRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteProject /// <summary> /// Delete the specified project. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteProject service method.</param> /// /// <returns>The response from the DeleteProject service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteProject">REST API Reference for DeleteProject Operation</seealso> DeleteProjectResponse DeleteProject(DeleteProjectRequest request); /// <summary> /// Delete the specified project. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteProject service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteProject service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteProject">REST API Reference for DeleteProject Operation</seealso> Task<DeleteProjectResponse> DeleteProjectAsync(DeleteProjectRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteTags /// <summary> /// Deletes the specified tags from an Amazon SageMaker resource. /// /// /// <para> /// To list a resource's tags, use the <code>ListTags</code> API. /// </para> /// <note> /// <para> /// When you call this API to delete tags from a hyperparameter tuning job, the deleted /// tags are not removed from training jobs that the hyperparameter tuning job launched /// before you called this API. /// </para> /// </note> <note> /// <para> /// When you call this API to delete tags from a SageMaker Studio Domain or User Profile, /// the deleted tags are not removed from Apps that the SageMaker Studio Domain or User /// Profile launched before you called this API. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTags service method.</param> /// /// <returns>The response from the DeleteTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags">REST API Reference for DeleteTags Operation</seealso> DeleteTagsResponse DeleteTags(DeleteTagsRequest request); /// <summary> /// Deletes the specified tags from an Amazon SageMaker resource. /// /// /// <para> /// To list a resource's tags, use the <code>ListTags</code> API. /// </para> /// <note> /// <para> /// When you call this API to delete tags from a hyperparameter tuning job, the deleted /// tags are not removed from training jobs that the hyperparameter tuning job launched /// before you called this API. /// </para> /// </note> <note> /// <para> /// When you call this API to delete tags from a SageMaker Studio Domain or User Profile, /// the deleted tags are not removed from Apps that the SageMaker Studio Domain or User /// Profile launched before you called this API. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTags service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags">REST API Reference for DeleteTags Operation</seealso> Task<DeleteTagsResponse> DeleteTagsAsync(DeleteTagsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteTrial /// <summary> /// Deletes the specified trial. All trial components that make up the trial must be deleted /// first. Use the <a>DescribeTrialComponent</a> API to get the list of trial components. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTrial service method.</param> /// /// <returns>The response from the DeleteTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTrial">REST API Reference for DeleteTrial Operation</seealso> DeleteTrialResponse DeleteTrial(DeleteTrialRequest request); /// <summary> /// Deletes the specified trial. All trial components that make up the trial must be deleted /// first. Use the <a>DescribeTrialComponent</a> API to get the list of trial components. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTrial service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTrial">REST API Reference for DeleteTrial Operation</seealso> Task<DeleteTrialResponse> DeleteTrialAsync(DeleteTrialRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteTrialComponent /// <summary> /// Deletes the specified trial component. A trial component must be disassociated from /// all trials before the trial component can be deleted. To disassociate a trial component /// from a trial, call the <a>DisassociateTrialComponent</a> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTrialComponent service method.</param> /// /// <returns>The response from the DeleteTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTrialComponent">REST API Reference for DeleteTrialComponent Operation</seealso> DeleteTrialComponentResponse DeleteTrialComponent(DeleteTrialComponentRequest request); /// <summary> /// Deletes the specified trial component. A trial component must be disassociated from /// all trials before the trial component can be deleted. To disassociate a trial component /// from a trial, call the <a>DisassociateTrialComponent</a> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTrialComponent">REST API Reference for DeleteTrialComponent Operation</seealso> Task<DeleteTrialComponentResponse> DeleteTrialComponentAsync(DeleteTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteUserProfile /// <summary> /// Deletes a user profile. When a user profile is deleted, the user loses access to their /// EFS volume, including data, notebooks, and other artifacts. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteUserProfile service method.</param> /// /// <returns>The response from the DeleteUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteUserProfile">REST API Reference for DeleteUserProfile Operation</seealso> DeleteUserProfileResponse DeleteUserProfile(DeleteUserProfileRequest request); /// <summary> /// Deletes a user profile. When a user profile is deleted, the user loses access to their /// EFS volume, including data, notebooks, and other artifacts. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteUserProfile service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteUserProfile">REST API Reference for DeleteUserProfile Operation</seealso> Task<DeleteUserProfileResponse> DeleteUserProfileAsync(DeleteUserProfileRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteWorkforce /// <summary> /// Use this operation to delete a workforce. /// /// /// <para> /// If you want to create a new workforce in an Amazon Web Services Region where a workforce /// already exists, use this operation to delete the existing workforce and then use to /// create a new workforce. /// </para> /// <important> /// <para> /// If a private workforce contains one or more work teams, you must use the operation /// to delete all work teams before you delete the workforce. If you try to delete a workforce /// that contains one or more work teams, you will recieve a <code>ResourceInUse</code> /// error. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteWorkforce service method.</param> /// /// <returns>The response from the DeleteWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkforce">REST API Reference for DeleteWorkforce Operation</seealso> DeleteWorkforceResponse DeleteWorkforce(DeleteWorkforceRequest request); /// <summary> /// Use this operation to delete a workforce. /// /// /// <para> /// If you want to create a new workforce in an Amazon Web Services Region where a workforce /// already exists, use this operation to delete the existing workforce and then use to /// create a new workforce. /// </para> /// <important> /// <para> /// If a private workforce contains one or more work teams, you must use the operation /// to delete all work teams before you delete the workforce. If you try to delete a workforce /// that contains one or more work teams, you will recieve a <code>ResourceInUse</code> /// error. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteWorkforce service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkforce">REST API Reference for DeleteWorkforce Operation</seealso> Task<DeleteWorkforceResponse> DeleteWorkforceAsync(DeleteWorkforceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteWorkteam /// <summary> /// Deletes an existing work team. This operation can't be undone. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteWorkteam service method.</param> /// /// <returns>The response from the DeleteWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam">REST API Reference for DeleteWorkteam Operation</seealso> DeleteWorkteamResponse DeleteWorkteam(DeleteWorkteamRequest request); /// <summary> /// Deletes an existing work team. This operation can't be undone. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam">REST API Reference for DeleteWorkteam Operation</seealso> Task<DeleteWorkteamResponse> DeleteWorkteamAsync(DeleteWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeregisterDevices /// <summary> /// Deregisters the specified devices. After you deregister a device, you will need to /// re-register the devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeregisterDevices service method.</param> /// /// <returns>The response from the DeregisterDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeregisterDevices">REST API Reference for DeregisterDevices Operation</seealso> DeregisterDevicesResponse DeregisterDevices(DeregisterDevicesRequest request); /// <summary> /// Deregisters the specified devices. After you deregister a device, you will need to /// re-register the devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeregisterDevices service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeregisterDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeregisterDevices">REST API Reference for DeregisterDevices Operation</seealso> Task<DeregisterDevicesResponse> DeregisterDevicesAsync(DeregisterDevicesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeAction /// <summary> /// Describes an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAction service method.</param> /// /// <returns>The response from the DescribeAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAction">REST API Reference for DescribeAction Operation</seealso> DescribeActionResponse DescribeAction(DescribeActionRequest request); /// <summary> /// Describes an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAction service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAction">REST API Reference for DescribeAction Operation</seealso> Task<DescribeActionResponse> DescribeActionAsync(DescribeActionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeAlgorithm /// <summary> /// Returns a description of the specified algorithm that is in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAlgorithm service method.</param> /// /// <returns>The response from the DescribeAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm">REST API Reference for DescribeAlgorithm Operation</seealso> DescribeAlgorithmResponse DescribeAlgorithm(DescribeAlgorithmRequest request); /// <summary> /// Returns a description of the specified algorithm that is in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAlgorithm service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeAlgorithm service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm">REST API Reference for DescribeAlgorithm Operation</seealso> Task<DescribeAlgorithmResponse> DescribeAlgorithmAsync(DescribeAlgorithmRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeApp /// <summary> /// Describes the app. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeApp service method.</param> /// /// <returns>The response from the DescribeApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeApp">REST API Reference for DescribeApp Operation</seealso> DescribeAppResponse DescribeApp(DescribeAppRequest request); /// <summary> /// Describes the app. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeApp service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeApp service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeApp">REST API Reference for DescribeApp Operation</seealso> Task<DescribeAppResponse> DescribeAppAsync(DescribeAppRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeAppImageConfig /// <summary> /// Describes an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAppImageConfig service method.</param> /// /// <returns>The response from the DescribeAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAppImageConfig">REST API Reference for DescribeAppImageConfig Operation</seealso> DescribeAppImageConfigResponse DescribeAppImageConfig(DescribeAppImageConfigRequest request); /// <summary> /// Describes an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAppImageConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAppImageConfig">REST API Reference for DescribeAppImageConfig Operation</seealso> Task<DescribeAppImageConfigResponse> DescribeAppImageConfigAsync(DescribeAppImageConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeArtifact /// <summary> /// Describes an artifact. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeArtifact service method.</param> /// /// <returns>The response from the DescribeArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeArtifact">REST API Reference for DescribeArtifact Operation</seealso> DescribeArtifactResponse DescribeArtifact(DescribeArtifactRequest request); /// <summary> /// Describes an artifact. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeArtifact service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeArtifact">REST API Reference for DescribeArtifact Operation</seealso> Task<DescribeArtifactResponse> DescribeArtifactAsync(DescribeArtifactRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeAutoMLJob /// <summary> /// Returns information about an Amazon SageMaker AutoML job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAutoMLJob service method.</param> /// /// <returns>The response from the DescribeAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAutoMLJob">REST API Reference for DescribeAutoMLJob Operation</seealso> DescribeAutoMLJobResponse DescribeAutoMLJob(DescribeAutoMLJobRequest request); /// <summary> /// Returns information about an Amazon SageMaker AutoML job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeAutoMLJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAutoMLJob">REST API Reference for DescribeAutoMLJob Operation</seealso> Task<DescribeAutoMLJobResponse> DescribeAutoMLJobAsync(DescribeAutoMLJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeCodeRepository /// <summary> /// Gets details about the specified Git repository. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCodeRepository service method.</param> /// /// <returns>The response from the DescribeCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository">REST API Reference for DescribeCodeRepository Operation</seealso> DescribeCodeRepositoryResponse DescribeCodeRepository(DescribeCodeRepositoryRequest request); /// <summary> /// Gets details about the specified Git repository. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCodeRepository service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository">REST API Reference for DescribeCodeRepository Operation</seealso> Task<DescribeCodeRepositoryResponse> DescribeCodeRepositoryAsync(DescribeCodeRepositoryRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeCompilationJob /// <summary> /// Returns information about a model compilation job. /// /// /// <para> /// To create a model compilation job, use <a>CreateCompilationJob</a>. To get information /// about multiple model compilation jobs, use <a>ListCompilationJobs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCompilationJob service method.</param> /// /// <returns>The response from the DescribeCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob">REST API Reference for DescribeCompilationJob Operation</seealso> DescribeCompilationJobResponse DescribeCompilationJob(DescribeCompilationJobRequest request); /// <summary> /// Returns information about a model compilation job. /// /// /// <para> /// To create a model compilation job, use <a>CreateCompilationJob</a>. To get information /// about multiple model compilation jobs, use <a>ListCompilationJobs</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeCompilationJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob">REST API Reference for DescribeCompilationJob Operation</seealso> Task<DescribeCompilationJobResponse> DescribeCompilationJobAsync(DescribeCompilationJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeContext /// <summary> /// Describes a context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeContext service method.</param> /// /// <returns>The response from the DescribeContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeContext">REST API Reference for DescribeContext Operation</seealso> DescribeContextResponse DescribeContext(DescribeContextRequest request); /// <summary> /// Describes a context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeContext service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeContext">REST API Reference for DescribeContext Operation</seealso> Task<DescribeContextResponse> DescribeContextAsync(DescribeContextRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeDataQualityJobDefinition /// <summary> /// Gets the details of a data quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDataQualityJobDefinition service method.</param> /// /// <returns>The response from the DescribeDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDataQualityJobDefinition">REST API Reference for DescribeDataQualityJobDefinition Operation</seealso> DescribeDataQualityJobDefinitionResponse DescribeDataQualityJobDefinition(DescribeDataQualityJobDefinitionRequest request); /// <summary> /// Gets the details of a data quality monitoring job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDataQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeDataQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDataQualityJobDefinition">REST API Reference for DescribeDataQualityJobDefinition Operation</seealso> Task<DescribeDataQualityJobDefinitionResponse> DescribeDataQualityJobDefinitionAsync(DescribeDataQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeDevice /// <summary> /// Describes the device. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDevice service method.</param> /// /// <returns>The response from the DescribeDevice service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDevice">REST API Reference for DescribeDevice Operation</seealso> DescribeDeviceResponse DescribeDevice(DescribeDeviceRequest request); /// <summary> /// Describes the device. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDevice service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeDevice service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDevice">REST API Reference for DescribeDevice Operation</seealso> Task<DescribeDeviceResponse> DescribeDeviceAsync(DescribeDeviceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeDeviceFleet /// <summary> /// A description of the fleet the device belongs to. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDeviceFleet service method.</param> /// /// <returns>The response from the DescribeDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDeviceFleet">REST API Reference for DescribeDeviceFleet Operation</seealso> DescribeDeviceFleetResponse DescribeDeviceFleet(DescribeDeviceFleetRequest request); /// <summary> /// A description of the fleet the device belongs to. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDeviceFleet service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDeviceFleet">REST API Reference for DescribeDeviceFleet Operation</seealso> Task<DescribeDeviceFleetResponse> DescribeDeviceFleetAsync(DescribeDeviceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeDomain /// <summary> /// The description of the domain. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDomain service method.</param> /// /// <returns>The response from the DescribeDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDomain">REST API Reference for DescribeDomain Operation</seealso> DescribeDomainResponse DescribeDomain(DescribeDomainRequest request); /// <summary> /// The description of the domain. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeDomain service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeDomain">REST API Reference for DescribeDomain Operation</seealso> Task<DescribeDomainResponse> DescribeDomainAsync(DescribeDomainRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeEdgePackagingJob /// <summary> /// A description of edge packaging jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEdgePackagingJob service method.</param> /// /// <returns>The response from the DescribeEdgePackagingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEdgePackagingJob">REST API Reference for DescribeEdgePackagingJob Operation</seealso> DescribeEdgePackagingJobResponse DescribeEdgePackagingJob(DescribeEdgePackagingJobRequest request); /// <summary> /// A description of edge packaging jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEdgePackagingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeEdgePackagingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEdgePackagingJob">REST API Reference for DescribeEdgePackagingJob Operation</seealso> Task<DescribeEdgePackagingJobResponse> DescribeEdgePackagingJobAsync(DescribeEdgePackagingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeEndpoint /// <summary> /// Returns the description of an endpoint. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpoint service method.</param> /// /// <returns>The response from the DescribeEndpoint service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint">REST API Reference for DescribeEndpoint Operation</seealso> DescribeEndpointResponse DescribeEndpoint(DescribeEndpointRequest request); /// <summary> /// Returns the description of an endpoint. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpoint service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeEndpoint service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint">REST API Reference for DescribeEndpoint Operation</seealso> Task<DescribeEndpointResponse> DescribeEndpointAsync(DescribeEndpointRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeEndpointConfig /// <summary> /// Returns the description of an endpoint configuration created using the <code>CreateEndpointConfig</code> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpointConfig service method.</param> /// /// <returns>The response from the DescribeEndpointConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig">REST API Reference for DescribeEndpointConfig Operation</seealso> DescribeEndpointConfigResponse DescribeEndpointConfig(DescribeEndpointConfigRequest request); /// <summary> /// Returns the description of an endpoint configuration created using the <code>CreateEndpointConfig</code> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEndpointConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeEndpointConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig">REST API Reference for DescribeEndpointConfig Operation</seealso> Task<DescribeEndpointConfigResponse> DescribeEndpointConfigAsync(DescribeEndpointConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeExperiment /// <summary> /// Provides a list of an experiment's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeExperiment service method.</param> /// /// <returns>The response from the DescribeExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeExperiment">REST API Reference for DescribeExperiment Operation</seealso> DescribeExperimentResponse DescribeExperiment(DescribeExperimentRequest request); /// <summary> /// Provides a list of an experiment's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeExperiment service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeExperiment">REST API Reference for DescribeExperiment Operation</seealso> Task<DescribeExperimentResponse> DescribeExperimentAsync(DescribeExperimentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeFeatureGroup /// <summary> /// Use this operation to describe a <code>FeatureGroup</code>. The response includes /// information on the creation time, <code>FeatureGroup</code> name, the unique identifier /// for each <code>FeatureGroup</code>, and more. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeFeatureGroup service method.</param> /// /// <returns>The response from the DescribeFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeFeatureGroup">REST API Reference for DescribeFeatureGroup Operation</seealso> DescribeFeatureGroupResponse DescribeFeatureGroup(DescribeFeatureGroupRequest request); /// <summary> /// Use this operation to describe a <code>FeatureGroup</code>. The response includes /// information on the creation time, <code>FeatureGroup</code> name, the unique identifier /// for each <code>FeatureGroup</code>, and more. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeFeatureGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeFeatureGroup service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeFeatureGroup">REST API Reference for DescribeFeatureGroup Operation</seealso> Task<DescribeFeatureGroupResponse> DescribeFeatureGroupAsync(DescribeFeatureGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeFlowDefinition /// <summary> /// Returns information about the specified flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeFlowDefinition service method.</param> /// /// <returns>The response from the DescribeFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeFlowDefinition">REST API Reference for DescribeFlowDefinition Operation</seealso> DescribeFlowDefinitionResponse DescribeFlowDefinition(DescribeFlowDefinitionRequest request); /// <summary> /// Returns information about the specified flow definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeFlowDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeFlowDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeFlowDefinition">REST API Reference for DescribeFlowDefinition Operation</seealso> Task<DescribeFlowDefinitionResponse> DescribeFlowDefinitionAsync(DescribeFlowDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeHumanTaskUi /// <summary> /// Returns information about the requested human task user interface (worker task template). /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeHumanTaskUi service method.</param> /// /// <returns>The response from the DescribeHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHumanTaskUi">REST API Reference for DescribeHumanTaskUi Operation</seealso> DescribeHumanTaskUiResponse DescribeHumanTaskUi(DescribeHumanTaskUiRequest request); /// <summary> /// Returns information about the requested human task user interface (worker task template). /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeHumanTaskUi service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeHumanTaskUi service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHumanTaskUi">REST API Reference for DescribeHumanTaskUi Operation</seealso> Task<DescribeHumanTaskUiResponse> DescribeHumanTaskUiAsync(DescribeHumanTaskUiRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeHyperParameterTuningJob /// <summary> /// Gets a description of a hyperparameter tuning job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeHyperParameterTuningJob service method.</param> /// /// <returns>The response from the DescribeHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob">REST API Reference for DescribeHyperParameterTuningJob Operation</seealso> DescribeHyperParameterTuningJobResponse DescribeHyperParameterTuningJob(DescribeHyperParameterTuningJobRequest request); /// <summary> /// Gets a description of a hyperparameter tuning job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeHyperParameterTuningJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob">REST API Reference for DescribeHyperParameterTuningJob Operation</seealso> Task<DescribeHyperParameterTuningJobResponse> DescribeHyperParameterTuningJobAsync(DescribeHyperParameterTuningJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeImage /// <summary> /// Describes a SageMaker image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeImage service method.</param> /// /// <returns>The response from the DescribeImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeImage">REST API Reference for DescribeImage Operation</seealso> DescribeImageResponse DescribeImage(DescribeImageRequest request); /// <summary> /// Describes a SageMaker image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeImage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeImage">REST API Reference for DescribeImage Operation</seealso> Task<DescribeImageResponse> DescribeImageAsync(DescribeImageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeImageVersion /// <summary> /// Describes a version of a SageMaker image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeImageVersion service method.</param> /// /// <returns>The response from the DescribeImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeImageVersion">REST API Reference for DescribeImageVersion Operation</seealso> DescribeImageVersionResponse DescribeImageVersion(DescribeImageVersionRequest request); /// <summary> /// Describes a version of a SageMaker image. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeImageVersion service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeImageVersion service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeImageVersion">REST API Reference for DescribeImageVersion Operation</seealso> Task<DescribeImageVersionResponse> DescribeImageVersionAsync(DescribeImageVersionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeLabelingJob /// <summary> /// Gets information about a labeling job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeLabelingJob service method.</param> /// /// <returns>The response from the DescribeLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob">REST API Reference for DescribeLabelingJob Operation</seealso> DescribeLabelingJobResponse DescribeLabelingJob(DescribeLabelingJobRequest request); /// <summary> /// Gets information about a labeling job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeLabelingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob">REST API Reference for DescribeLabelingJob Operation</seealso> Task<DescribeLabelingJobResponse> DescribeLabelingJobAsync(DescribeLabelingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModel /// <summary> /// Describes a model that you created using the <code>CreateModel</code> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModel service method.</param> /// /// <returns>The response from the DescribeModel service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel">REST API Reference for DescribeModel Operation</seealso> DescribeModelResponse DescribeModel(DescribeModelRequest request); /// <summary> /// Describes a model that you created using the <code>CreateModel</code> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModel service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModel service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel">REST API Reference for DescribeModel Operation</seealso> Task<DescribeModelResponse> DescribeModelAsync(DescribeModelRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModelBiasJobDefinition /// <summary> /// Returns a description of a model bias job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelBiasJobDefinition service method.</param> /// /// <returns>The response from the DescribeModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelBiasJobDefinition">REST API Reference for DescribeModelBiasJobDefinition Operation</seealso> DescribeModelBiasJobDefinitionResponse DescribeModelBiasJobDefinition(DescribeModelBiasJobDefinitionRequest request); /// <summary> /// Returns a description of a model bias job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelBiasJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModelBiasJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelBiasJobDefinition">REST API Reference for DescribeModelBiasJobDefinition Operation</seealso> Task<DescribeModelBiasJobDefinitionResponse> DescribeModelBiasJobDefinitionAsync(DescribeModelBiasJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModelExplainabilityJobDefinition /// <summary> /// Returns a description of a model explainability job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelExplainabilityJobDefinition service method.</param> /// /// <returns>The response from the DescribeModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelExplainabilityJobDefinition">REST API Reference for DescribeModelExplainabilityJobDefinition Operation</seealso> DescribeModelExplainabilityJobDefinitionResponse DescribeModelExplainabilityJobDefinition(DescribeModelExplainabilityJobDefinitionRequest request); /// <summary> /// Returns a description of a model explainability job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelExplainabilityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModelExplainabilityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelExplainabilityJobDefinition">REST API Reference for DescribeModelExplainabilityJobDefinition Operation</seealso> Task<DescribeModelExplainabilityJobDefinitionResponse> DescribeModelExplainabilityJobDefinitionAsync(DescribeModelExplainabilityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModelPackage /// <summary> /// Returns a description of the specified model package, which is used to create Amazon /// SageMaker models or list them on Amazon Web Services Marketplace. /// /// /// <para> /// To create models in Amazon SageMaker, buyers can subscribe to model packages listed /// on Amazon Web Services Marketplace. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelPackage service method.</param> /// /// <returns>The response from the DescribeModelPackage service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage">REST API Reference for DescribeModelPackage Operation</seealso> DescribeModelPackageResponse DescribeModelPackage(DescribeModelPackageRequest request); /// <summary> /// Returns a description of the specified model package, which is used to create Amazon /// SageMaker models or list them on Amazon Web Services Marketplace. /// /// /// <para> /// To create models in Amazon SageMaker, buyers can subscribe to model packages listed /// on Amazon Web Services Marketplace. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelPackage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModelPackage service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage">REST API Reference for DescribeModelPackage Operation</seealso> Task<DescribeModelPackageResponse> DescribeModelPackageAsync(DescribeModelPackageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModelPackageGroup /// <summary> /// Gets a description for the specified model group. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelPackageGroup service method.</param> /// /// <returns>The response from the DescribeModelPackageGroup service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackageGroup">REST API Reference for DescribeModelPackageGroup Operation</seealso> DescribeModelPackageGroupResponse DescribeModelPackageGroup(DescribeModelPackageGroupRequest request); /// <summary> /// Gets a description for the specified model group. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelPackageGroup service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModelPackageGroup service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackageGroup">REST API Reference for DescribeModelPackageGroup Operation</seealso> Task<DescribeModelPackageGroupResponse> DescribeModelPackageGroupAsync(DescribeModelPackageGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeModelQualityJobDefinition /// <summary> /// Returns a description of a model quality job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelQualityJobDefinition service method.</param> /// /// <returns>The response from the DescribeModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelQualityJobDefinition">REST API Reference for DescribeModelQualityJobDefinition Operation</seealso> DescribeModelQualityJobDefinitionResponse DescribeModelQualityJobDefinition(DescribeModelQualityJobDefinitionRequest request); /// <summary> /// Returns a description of a model quality job definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeModelQualityJobDefinition service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeModelQualityJobDefinition service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelQualityJobDefinition">REST API Reference for DescribeModelQualityJobDefinition Operation</seealso> Task<DescribeModelQualityJobDefinitionResponse> DescribeModelQualityJobDefinitionAsync(DescribeModelQualityJobDefinitionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeMonitoringSchedule /// <summary> /// Describes the schedule for a monitoring job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeMonitoringSchedule service method.</param> /// /// <returns>The response from the DescribeMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeMonitoringSchedule">REST API Reference for DescribeMonitoringSchedule Operation</seealso> DescribeMonitoringScheduleResponse DescribeMonitoringSchedule(DescribeMonitoringScheduleRequest request); /// <summary> /// Describes the schedule for a monitoring job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeMonitoringSchedule">REST API Reference for DescribeMonitoringSchedule Operation</seealso> Task<DescribeMonitoringScheduleResponse> DescribeMonitoringScheduleAsync(DescribeMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeNotebookInstance /// <summary> /// Returns information about a notebook instance. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeNotebookInstance service method.</param> /// /// <returns>The response from the DescribeNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance">REST API Reference for DescribeNotebookInstance Operation</seealso> DescribeNotebookInstanceResponse DescribeNotebookInstance(DescribeNotebookInstanceRequest request); /// <summary> /// Returns information about a notebook instance. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance">REST API Reference for DescribeNotebookInstance Operation</seealso> Task<DescribeNotebookInstanceResponse> DescribeNotebookInstanceAsync(DescribeNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeNotebookInstanceLifecycleConfig /// <summary> /// Returns a description of a notebook instance lifecycle configuration. /// /// /// <para> /// For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step /// 2.1: (Optional) Customize a Notebook Instance</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeNotebookInstanceLifecycleConfig service method.</param> /// /// <returns>The response from the DescribeNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig">REST API Reference for DescribeNotebookInstanceLifecycleConfig Operation</seealso> DescribeNotebookInstanceLifecycleConfigResponse DescribeNotebookInstanceLifecycleConfig(DescribeNotebookInstanceLifecycleConfigRequest request); /// <summary> /// Returns a description of a notebook instance lifecycle configuration. /// /// /// <para> /// For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step /// 2.1: (Optional) Customize a Notebook Instance</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeNotebookInstanceLifecycleConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig">REST API Reference for DescribeNotebookInstanceLifecycleConfig Operation</seealso> Task<DescribeNotebookInstanceLifecycleConfigResponse> DescribeNotebookInstanceLifecycleConfigAsync(DescribeNotebookInstanceLifecycleConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribePipeline /// <summary> /// Describes the details of a pipeline. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipeline service method.</param> /// /// <returns>The response from the DescribePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipeline">REST API Reference for DescribePipeline Operation</seealso> DescribePipelineResponse DescribePipeline(DescribePipelineRequest request); /// <summary> /// Describes the details of a pipeline. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipeline service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipeline">REST API Reference for DescribePipeline Operation</seealso> Task<DescribePipelineResponse> DescribePipelineAsync(DescribePipelineRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribePipelineDefinitionForExecution /// <summary> /// Describes the details of an execution's pipeline definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipelineDefinitionForExecution service method.</param> /// /// <returns>The response from the DescribePipelineDefinitionForExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipelineDefinitionForExecution">REST API Reference for DescribePipelineDefinitionForExecution Operation</seealso> DescribePipelineDefinitionForExecutionResponse DescribePipelineDefinitionForExecution(DescribePipelineDefinitionForExecutionRequest request); /// <summary> /// Describes the details of an execution's pipeline definition. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipelineDefinitionForExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribePipelineDefinitionForExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipelineDefinitionForExecution">REST API Reference for DescribePipelineDefinitionForExecution Operation</seealso> Task<DescribePipelineDefinitionForExecutionResponse> DescribePipelineDefinitionForExecutionAsync(DescribePipelineDefinitionForExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribePipelineExecution /// <summary> /// Describes the details of a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipelineExecution service method.</param> /// /// <returns>The response from the DescribePipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipelineExecution">REST API Reference for DescribePipelineExecution Operation</seealso> DescribePipelineExecutionResponse DescribePipelineExecution(DescribePipelineExecutionRequest request); /// <summary> /// Describes the details of a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribePipelineExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribePipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribePipelineExecution">REST API Reference for DescribePipelineExecution Operation</seealso> Task<DescribePipelineExecutionResponse> DescribePipelineExecutionAsync(DescribePipelineExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeProcessingJob /// <summary> /// Returns a description of a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeProcessingJob service method.</param> /// /// <returns>The response from the DescribeProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeProcessingJob">REST API Reference for DescribeProcessingJob Operation</seealso> DescribeProcessingJobResponse DescribeProcessingJob(DescribeProcessingJobRequest request); /// <summary> /// Returns a description of a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeProcessingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeProcessingJob">REST API Reference for DescribeProcessingJob Operation</seealso> Task<DescribeProcessingJobResponse> DescribeProcessingJobAsync(DescribeProcessingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeProject /// <summary> /// Describes the details of a project. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeProject service method.</param> /// /// <returns>The response from the DescribeProject service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeProject">REST API Reference for DescribeProject Operation</seealso> DescribeProjectResponse DescribeProject(DescribeProjectRequest request); /// <summary> /// Describes the details of a project. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeProject service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeProject service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeProject">REST API Reference for DescribeProject Operation</seealso> Task<DescribeProjectResponse> DescribeProjectAsync(DescribeProjectRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeSubscribedWorkteam /// <summary> /// Gets information about a work team provided by a vendor. It returns details about /// the subscription with a vendor in the Amazon Web Services Marketplace. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSubscribedWorkteam service method.</param> /// /// <returns>The response from the DescribeSubscribedWorkteam service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam">REST API Reference for DescribeSubscribedWorkteam Operation</seealso> DescribeSubscribedWorkteamResponse DescribeSubscribedWorkteam(DescribeSubscribedWorkteamRequest request); /// <summary> /// Gets information about a work team provided by a vendor. It returns details about /// the subscription with a vendor in the Amazon Web Services Marketplace. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSubscribedWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeSubscribedWorkteam service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam">REST API Reference for DescribeSubscribedWorkteam Operation</seealso> Task<DescribeSubscribedWorkteamResponse> DescribeSubscribedWorkteamAsync(DescribeSubscribedWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeTrainingJob /// <summary> /// Returns information about a training job. /// /// /// <para> /// Some of the attributes below only appear if the training job successfully starts. /// If the training job fails, <code>TrainingJobStatus</code> is <code>Failed</code> and, /// depending on the <code>FailureReason</code>, attributes like <code>TrainingStartTime</code>, /// <code>TrainingTimeInSeconds</code>, <code>TrainingEndTime</code>, and <code>BillableTimeInSeconds</code> /// may not be present in the response. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrainingJob service method.</param> /// /// <returns>The response from the DescribeTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob">REST API Reference for DescribeTrainingJob Operation</seealso> DescribeTrainingJobResponse DescribeTrainingJob(DescribeTrainingJobRequest request); /// <summary> /// Returns information about a training job. /// /// /// <para> /// Some of the attributes below only appear if the training job successfully starts. /// If the training job fails, <code>TrainingJobStatus</code> is <code>Failed</code> and, /// depending on the <code>FailureReason</code>, attributes like <code>TrainingStartTime</code>, /// <code>TrainingTimeInSeconds</code>, <code>TrainingEndTime</code>, and <code>BillableTimeInSeconds</code> /// may not be present in the response. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrainingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob">REST API Reference for DescribeTrainingJob Operation</seealso> Task<DescribeTrainingJobResponse> DescribeTrainingJobAsync(DescribeTrainingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeTransformJob /// <summary> /// Returns information about a transform job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTransformJob service method.</param> /// /// <returns>The response from the DescribeTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob">REST API Reference for DescribeTransformJob Operation</seealso> DescribeTransformJobResponse DescribeTransformJob(DescribeTransformJobRequest request); /// <summary> /// Returns information about a transform job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTransformJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob">REST API Reference for DescribeTransformJob Operation</seealso> Task<DescribeTransformJobResponse> DescribeTransformJobAsync(DescribeTransformJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeTrial /// <summary> /// Provides a list of a trial's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrial service method.</param> /// /// <returns>The response from the DescribeTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrial">REST API Reference for DescribeTrial Operation</seealso> DescribeTrialResponse DescribeTrial(DescribeTrialRequest request); /// <summary> /// Provides a list of a trial's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrial service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrial">REST API Reference for DescribeTrial Operation</seealso> Task<DescribeTrialResponse> DescribeTrialAsync(DescribeTrialRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeTrialComponent /// <summary> /// Provides a list of a trials component's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrialComponent service method.</param> /// /// <returns>The response from the DescribeTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrialComponent">REST API Reference for DescribeTrialComponent Operation</seealso> DescribeTrialComponentResponse DescribeTrialComponent(DescribeTrialComponentRequest request); /// <summary> /// Provides a list of a trials component's properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrialComponent">REST API Reference for DescribeTrialComponent Operation</seealso> Task<DescribeTrialComponentResponse> DescribeTrialComponentAsync(DescribeTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeUserProfile /// <summary> /// Describes a user profile. For more information, see <code>CreateUserProfile</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeUserProfile service method.</param> /// /// <returns>The response from the DescribeUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeUserProfile">REST API Reference for DescribeUserProfile Operation</seealso> DescribeUserProfileResponse DescribeUserProfile(DescribeUserProfileRequest request); /// <summary> /// Describes a user profile. For more information, see <code>CreateUserProfile</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeUserProfile service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeUserProfile">REST API Reference for DescribeUserProfile Operation</seealso> Task<DescribeUserProfileResponse> DescribeUserProfileAsync(DescribeUserProfileRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeWorkforce /// <summary> /// Lists private workforce information, including workforce name, Amazon Resource Name /// (ARN), and, if applicable, allowed IP address ranges (<a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">CIDRs</a>). /// Allowable IP address ranges are the IP addresses that workers can use to access tasks. /// /// /// <important> /// <para> /// This operation applies only to private workforces. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkforce service method.</param> /// /// <returns>The response from the DescribeWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkforce">REST API Reference for DescribeWorkforce Operation</seealso> DescribeWorkforceResponse DescribeWorkforce(DescribeWorkforceRequest request); /// <summary> /// Lists private workforce information, including workforce name, Amazon Resource Name /// (ARN), and, if applicable, allowed IP address ranges (<a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">CIDRs</a>). /// Allowable IP address ranges are the IP addresses that workers can use to access tasks. /// /// /// <important> /// <para> /// This operation applies only to private workforces. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkforce service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkforce">REST API Reference for DescribeWorkforce Operation</seealso> Task<DescribeWorkforceResponse> DescribeWorkforceAsync(DescribeWorkforceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeWorkteam /// <summary> /// Gets information about a specific work team. You can see information such as the create /// date, the last updated date, membership information, and the work team's Amazon Resource /// Name (ARN). /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkteam service method.</param> /// /// <returns>The response from the DescribeWorkteam service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam">REST API Reference for DescribeWorkteam Operation</seealso> DescribeWorkteamResponse DescribeWorkteam(DescribeWorkteamRequest request); /// <summary> /// Gets information about a specific work team. You can see information such as the create /// date, the last updated date, membership information, and the work team's Amazon Resource /// Name (ARN). /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeWorkteam service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam">REST API Reference for DescribeWorkteam Operation</seealso> Task<DescribeWorkteamResponse> DescribeWorkteamAsync(DescribeWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DisableSagemakerServicecatalogPortfolio /// <summary> /// Disables using Service Catalog in SageMaker. Service Catalog is used to create SageMaker /// projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DisableSagemakerServicecatalogPortfolio service method.</param> /// /// <returns>The response from the DisableSagemakerServicecatalogPortfolio service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DisableSagemakerServicecatalogPortfolio">REST API Reference for DisableSagemakerServicecatalogPortfolio Operation</seealso> DisableSagemakerServicecatalogPortfolioResponse DisableSagemakerServicecatalogPortfolio(DisableSagemakerServicecatalogPortfolioRequest request); /// <summary> /// Disables using Service Catalog in SageMaker. Service Catalog is used to create SageMaker /// projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DisableSagemakerServicecatalogPortfolio service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DisableSagemakerServicecatalogPortfolio service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DisableSagemakerServicecatalogPortfolio">REST API Reference for DisableSagemakerServicecatalogPortfolio Operation</seealso> Task<DisableSagemakerServicecatalogPortfolioResponse> DisableSagemakerServicecatalogPortfolioAsync(DisableSagemakerServicecatalogPortfolioRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DisassociateTrialComponent /// <summary> /// Disassociates a trial component from a trial. This doesn't effect other trials the /// component is associated with. Before you can delete a component, you must disassociate /// the component from all trials it is associated with. To associate a trial component /// with a trial, call the <a>AssociateTrialComponent</a> API. /// /// /// <para> /// To get a list of the trials a component is associated with, use the <a>Search</a> /// API. Specify <code>ExperimentTrialComponent</code> for the <code>Resource</code> parameter. /// The list appears in the response under <code>Results.TrialComponent.Parents</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DisassociateTrialComponent service method.</param> /// /// <returns>The response from the DisassociateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DisassociateTrialComponent">REST API Reference for DisassociateTrialComponent Operation</seealso> DisassociateTrialComponentResponse DisassociateTrialComponent(DisassociateTrialComponentRequest request); /// <summary> /// Disassociates a trial component from a trial. This doesn't effect other trials the /// component is associated with. Before you can delete a component, you must disassociate /// the component from all trials it is associated with. To associate a trial component /// with a trial, call the <a>AssociateTrialComponent</a> API. /// /// /// <para> /// To get a list of the trials a component is associated with, use the <a>Search</a> /// API. Specify <code>ExperimentTrialComponent</code> for the <code>Resource</code> parameter. /// The list appears in the response under <code>Results.TrialComponent.Parents</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DisassociateTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DisassociateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DisassociateTrialComponent">REST API Reference for DisassociateTrialComponent Operation</seealso> Task<DisassociateTrialComponentResponse> DisassociateTrialComponentAsync(DisassociateTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region EnableSagemakerServicecatalogPortfolio /// <summary> /// Enables using Service Catalog in SageMaker. Service Catalog is used to create SageMaker /// projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the EnableSagemakerServicecatalogPortfolio service method.</param> /// /// <returns>The response from the EnableSagemakerServicecatalogPortfolio service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/EnableSagemakerServicecatalogPortfolio">REST API Reference for EnableSagemakerServicecatalogPortfolio Operation</seealso> EnableSagemakerServicecatalogPortfolioResponse EnableSagemakerServicecatalogPortfolio(EnableSagemakerServicecatalogPortfolioRequest request); /// <summary> /// Enables using Service Catalog in SageMaker. Service Catalog is used to create SageMaker /// projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the EnableSagemakerServicecatalogPortfolio service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the EnableSagemakerServicecatalogPortfolio service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/EnableSagemakerServicecatalogPortfolio">REST API Reference for EnableSagemakerServicecatalogPortfolio Operation</seealso> Task<EnableSagemakerServicecatalogPortfolioResponse> EnableSagemakerServicecatalogPortfolioAsync(EnableSagemakerServicecatalogPortfolioRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetDeviceFleetReport /// <summary> /// Describes a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetDeviceFleetReport service method.</param> /// /// <returns>The response from the GetDeviceFleetReport service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetDeviceFleetReport">REST API Reference for GetDeviceFleetReport Operation</seealso> GetDeviceFleetReportResponse GetDeviceFleetReport(GetDeviceFleetReportRequest request); /// <summary> /// Describes a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetDeviceFleetReport service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetDeviceFleetReport service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetDeviceFleetReport">REST API Reference for GetDeviceFleetReport Operation</seealso> Task<GetDeviceFleetReportResponse> GetDeviceFleetReportAsync(GetDeviceFleetReportRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetModelPackageGroupPolicy /// <summary> /// Gets a resource policy that manages access for a model group. For information about /// resource policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html">Identity-based /// policies and resource-based policies</a> in the <i>Amazon Web Services Identity and /// Access Management User Guide.</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetModelPackageGroupPolicy service method.</param> /// /// <returns>The response from the GetModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetModelPackageGroupPolicy">REST API Reference for GetModelPackageGroupPolicy Operation</seealso> GetModelPackageGroupPolicyResponse GetModelPackageGroupPolicy(GetModelPackageGroupPolicyRequest request); /// <summary> /// Gets a resource policy that manages access for a model group. For information about /// resource policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html">Identity-based /// policies and resource-based policies</a> in the <i>Amazon Web Services Identity and /// Access Management User Guide.</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetModelPackageGroupPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetModelPackageGroupPolicy">REST API Reference for GetModelPackageGroupPolicy Operation</seealso> Task<GetModelPackageGroupPolicyResponse> GetModelPackageGroupPolicyAsync(GetModelPackageGroupPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetSagemakerServicecatalogPortfolioStatus /// <summary> /// Gets the status of Service Catalog in SageMaker. Service Catalog is used to create /// SageMaker projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetSagemakerServicecatalogPortfolioStatus service method.</param> /// /// <returns>The response from the GetSagemakerServicecatalogPortfolioStatus service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSagemakerServicecatalogPortfolioStatus">REST API Reference for GetSagemakerServicecatalogPortfolioStatus Operation</seealso> GetSagemakerServicecatalogPortfolioStatusResponse GetSagemakerServicecatalogPortfolioStatus(GetSagemakerServicecatalogPortfolioStatusRequest request); /// <summary> /// Gets the status of Service Catalog in SageMaker. Service Catalog is used to create /// SageMaker projects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetSagemakerServicecatalogPortfolioStatus service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetSagemakerServicecatalogPortfolioStatus service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSagemakerServicecatalogPortfolioStatus">REST API Reference for GetSagemakerServicecatalogPortfolioStatus Operation</seealso> Task<GetSagemakerServicecatalogPortfolioStatusResponse> GetSagemakerServicecatalogPortfolioStatusAsync(GetSagemakerServicecatalogPortfolioStatusRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetSearchSuggestions /// <summary> /// An auto-complete API for the search functionality in the Amazon SageMaker console. /// It returns suggestions of possible matches for the property name to use in <code>Search</code> /// queries. Provides suggestions for <code>HyperParameters</code>, <code>Tags</code>, /// and <code>Metrics</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetSearchSuggestions service method.</param> /// /// <returns>The response from the GetSearchSuggestions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions">REST API Reference for GetSearchSuggestions Operation</seealso> GetSearchSuggestionsResponse GetSearchSuggestions(GetSearchSuggestionsRequest request); /// <summary> /// An auto-complete API for the search functionality in the Amazon SageMaker console. /// It returns suggestions of possible matches for the property name to use in <code>Search</code> /// queries. Provides suggestions for <code>HyperParameters</code>, <code>Tags</code>, /// and <code>Metrics</code>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetSearchSuggestions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetSearchSuggestions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions">REST API Reference for GetSearchSuggestions Operation</seealso> Task<GetSearchSuggestionsResponse> GetSearchSuggestionsAsync(GetSearchSuggestionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListActions /// <summary> /// Lists the actions in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListActions service method.</param> /// /// <returns>The response from the ListActions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListActions">REST API Reference for ListActions Operation</seealso> ListActionsResponse ListActions(ListActionsRequest request); /// <summary> /// Lists the actions in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListActions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListActions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListActions">REST API Reference for ListActions Operation</seealso> Task<ListActionsResponse> ListActionsAsync(ListActionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListAlgorithms /// <summary> /// Lists the machine learning algorithms that have been created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAlgorithms service method.</param> /// /// <returns>The response from the ListAlgorithms service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms">REST API Reference for ListAlgorithms Operation</seealso> ListAlgorithmsResponse ListAlgorithms(ListAlgorithmsRequest request); /// <summary> /// Lists the machine learning algorithms that have been created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAlgorithms service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListAlgorithms service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms">REST API Reference for ListAlgorithms Operation</seealso> Task<ListAlgorithmsResponse> ListAlgorithmsAsync(ListAlgorithmsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListAppImageConfigs /// <summary> /// Lists the AppImageConfigs in your account and their properties. The list can be filtered /// by creation time or modified time, and whether the AppImageConfig name contains a /// specified string. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAppImageConfigs service method.</param> /// /// <returns>The response from the ListAppImageConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAppImageConfigs">REST API Reference for ListAppImageConfigs Operation</seealso> ListAppImageConfigsResponse ListAppImageConfigs(ListAppImageConfigsRequest request); /// <summary> /// Lists the AppImageConfigs in your account and their properties. The list can be filtered /// by creation time or modified time, and whether the AppImageConfig name contains a /// specified string. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAppImageConfigs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListAppImageConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAppImageConfigs">REST API Reference for ListAppImageConfigs Operation</seealso> Task<ListAppImageConfigsResponse> ListAppImageConfigsAsync(ListAppImageConfigsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListApps /// <summary> /// Lists apps. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListApps service method.</param> /// /// <returns>The response from the ListApps service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListApps">REST API Reference for ListApps Operation</seealso> ListAppsResponse ListApps(ListAppsRequest request); /// <summary> /// Lists apps. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListApps service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListApps service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListApps">REST API Reference for ListApps Operation</seealso> Task<ListAppsResponse> ListAppsAsync(ListAppsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListArtifacts /// <summary> /// Lists the artifacts in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListArtifacts service method.</param> /// /// <returns>The response from the ListArtifacts service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListArtifacts">REST API Reference for ListArtifacts Operation</seealso> ListArtifactsResponse ListArtifacts(ListArtifactsRequest request); /// <summary> /// Lists the artifacts in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListArtifacts service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListArtifacts service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListArtifacts">REST API Reference for ListArtifacts Operation</seealso> Task<ListArtifactsResponse> ListArtifactsAsync(ListArtifactsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListAssociations /// <summary> /// Lists the associations in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAssociations service method.</param> /// /// <returns>The response from the ListAssociations service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAssociations">REST API Reference for ListAssociations Operation</seealso> ListAssociationsResponse ListAssociations(ListAssociationsRequest request); /// <summary> /// Lists the associations in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAssociations service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListAssociations service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAssociations">REST API Reference for ListAssociations Operation</seealso> Task<ListAssociationsResponse> ListAssociationsAsync(ListAssociationsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListAutoMLJobs /// <summary> /// Request a list of jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAutoMLJobs service method.</param> /// /// <returns>The response from the ListAutoMLJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAutoMLJobs">REST API Reference for ListAutoMLJobs Operation</seealso> ListAutoMLJobsResponse ListAutoMLJobs(ListAutoMLJobsRequest request); /// <summary> /// Request a list of jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListAutoMLJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListAutoMLJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAutoMLJobs">REST API Reference for ListAutoMLJobs Operation</seealso> Task<ListAutoMLJobsResponse> ListAutoMLJobsAsync(ListAutoMLJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListCandidatesForAutoMLJob /// <summary> /// List the candidates created for the job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCandidatesForAutoMLJob service method.</param> /// /// <returns>The response from the ListCandidatesForAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCandidatesForAutoMLJob">REST API Reference for ListCandidatesForAutoMLJob Operation</seealso> ListCandidatesForAutoMLJobResponse ListCandidatesForAutoMLJob(ListCandidatesForAutoMLJobRequest request); /// <summary> /// List the candidates created for the job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCandidatesForAutoMLJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListCandidatesForAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCandidatesForAutoMLJob">REST API Reference for ListCandidatesForAutoMLJob Operation</seealso> Task<ListCandidatesForAutoMLJobResponse> ListCandidatesForAutoMLJobAsync(ListCandidatesForAutoMLJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListCodeRepositories /// <summary> /// Gets a list of the Git repositories in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCodeRepositories service method.</param> /// /// <returns>The response from the ListCodeRepositories service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories">REST API Reference for ListCodeRepositories Operation</seealso> ListCodeRepositoriesResponse ListCodeRepositories(ListCodeRepositoriesRequest request); /// <summary> /// Gets a list of the Git repositories in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCodeRepositories service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListCodeRepositories service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories">REST API Reference for ListCodeRepositories Operation</seealso> Task<ListCodeRepositoriesResponse> ListCodeRepositoriesAsync(ListCodeRepositoriesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListCompilationJobs /// <summary> /// Lists model compilation jobs that satisfy various filters. /// /// /// <para> /// To create a model compilation job, use <a>CreateCompilationJob</a>. To get information /// about a particular model compilation job you have created, use <a>DescribeCompilationJob</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCompilationJobs service method.</param> /// /// <returns>The response from the ListCompilationJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs">REST API Reference for ListCompilationJobs Operation</seealso> ListCompilationJobsResponse ListCompilationJobs(ListCompilationJobsRequest request); /// <summary> /// Lists model compilation jobs that satisfy various filters. /// /// /// <para> /// To create a model compilation job, use <a>CreateCompilationJob</a>. To get information /// about a particular model compilation job you have created, use <a>DescribeCompilationJob</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListCompilationJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListCompilationJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs">REST API Reference for ListCompilationJobs Operation</seealso> Task<ListCompilationJobsResponse> ListCompilationJobsAsync(ListCompilationJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListContexts /// <summary> /// Lists the contexts in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListContexts service method.</param> /// /// <returns>The response from the ListContexts service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListContexts">REST API Reference for ListContexts Operation</seealso> ListContextsResponse ListContexts(ListContextsRequest request); /// <summary> /// Lists the contexts in your account and their properties. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListContexts service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListContexts service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListContexts">REST API Reference for ListContexts Operation</seealso> Task<ListContextsResponse> ListContextsAsync(ListContextsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListDataQualityJobDefinitions /// <summary> /// Lists the data quality job definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDataQualityJobDefinitions service method.</param> /// /// <returns>The response from the ListDataQualityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDataQualityJobDefinitions">REST API Reference for ListDataQualityJobDefinitions Operation</seealso> ListDataQualityJobDefinitionsResponse ListDataQualityJobDefinitions(ListDataQualityJobDefinitionsRequest request); /// <summary> /// Lists the data quality job definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDataQualityJobDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListDataQualityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDataQualityJobDefinitions">REST API Reference for ListDataQualityJobDefinitions Operation</seealso> Task<ListDataQualityJobDefinitionsResponse> ListDataQualityJobDefinitionsAsync(ListDataQualityJobDefinitionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListDeviceFleets /// <summary> /// Returns a list of devices in the fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDeviceFleets service method.</param> /// /// <returns>The response from the ListDeviceFleets service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDeviceFleets">REST API Reference for ListDeviceFleets Operation</seealso> ListDeviceFleetsResponse ListDeviceFleets(ListDeviceFleetsRequest request); /// <summary> /// Returns a list of devices in the fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDeviceFleets service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListDeviceFleets service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDeviceFleets">REST API Reference for ListDeviceFleets Operation</seealso> Task<ListDeviceFleetsResponse> ListDeviceFleetsAsync(ListDeviceFleetsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListDevices /// <summary> /// A list of devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDevices service method.</param> /// /// <returns>The response from the ListDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDevices">REST API Reference for ListDevices Operation</seealso> ListDevicesResponse ListDevices(ListDevicesRequest request); /// <summary> /// A list of devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDevices service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDevices">REST API Reference for ListDevices Operation</seealso> Task<ListDevicesResponse> ListDevicesAsync(ListDevicesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListDomains /// <summary> /// Lists the domains. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDomains service method.</param> /// /// <returns>The response from the ListDomains service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDomains">REST API Reference for ListDomains Operation</seealso> ListDomainsResponse ListDomains(ListDomainsRequest request); /// <summary> /// Lists the domains. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDomains service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListDomains service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListDomains">REST API Reference for ListDomains Operation</seealso> Task<ListDomainsResponse> ListDomainsAsync(ListDomainsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListEdgePackagingJobs /// <summary> /// Returns a list of edge packaging jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEdgePackagingJobs service method.</param> /// /// <returns>The response from the ListEdgePackagingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEdgePackagingJobs">REST API Reference for ListEdgePackagingJobs Operation</seealso> ListEdgePackagingJobsResponse ListEdgePackagingJobs(ListEdgePackagingJobsRequest request); /// <summary> /// Returns a list of edge packaging jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEdgePackagingJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListEdgePackagingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEdgePackagingJobs">REST API Reference for ListEdgePackagingJobs Operation</seealso> Task<ListEdgePackagingJobsResponse> ListEdgePackagingJobsAsync(ListEdgePackagingJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListEndpointConfigs /// <summary> /// Lists endpoint configurations. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEndpointConfigs service method.</param> /// /// <returns>The response from the ListEndpointConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs">REST API Reference for ListEndpointConfigs Operation</seealso> ListEndpointConfigsResponse ListEndpointConfigs(ListEndpointConfigsRequest request); /// <summary> /// Lists endpoint configurations. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEndpointConfigs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListEndpointConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs">REST API Reference for ListEndpointConfigs Operation</seealso> Task<ListEndpointConfigsResponse> ListEndpointConfigsAsync(ListEndpointConfigsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListEndpoints /// <summary> /// Lists endpoints. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEndpoints service method.</param> /// /// <returns>The response from the ListEndpoints service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints">REST API Reference for ListEndpoints Operation</seealso> ListEndpointsResponse ListEndpoints(ListEndpointsRequest request); /// <summary> /// Lists endpoints. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEndpoints service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListEndpoints service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints">REST API Reference for ListEndpoints Operation</seealso> Task<ListEndpointsResponse> ListEndpointsAsync(ListEndpointsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListExperiments /// <summary> /// Lists all the experiments in your account. The list can be filtered to show only experiments /// that were created in a specific time range. The list can be sorted by experiment name /// or creation time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListExperiments service method.</param> /// /// <returns>The response from the ListExperiments service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListExperiments">REST API Reference for ListExperiments Operation</seealso> ListExperimentsResponse ListExperiments(ListExperimentsRequest request); /// <summary> /// Lists all the experiments in your account. The list can be filtered to show only experiments /// that were created in a specific time range. The list can be sorted by experiment name /// or creation time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListExperiments service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListExperiments service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListExperiments">REST API Reference for ListExperiments Operation</seealso> Task<ListExperimentsResponse> ListExperimentsAsync(ListExperimentsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListFeatureGroups /// <summary> /// List <code>FeatureGroup</code>s based on given filter and order. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListFeatureGroups service method.</param> /// /// <returns>The response from the ListFeatureGroups service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListFeatureGroups">REST API Reference for ListFeatureGroups Operation</seealso> ListFeatureGroupsResponse ListFeatureGroups(ListFeatureGroupsRequest request); /// <summary> /// List <code>FeatureGroup</code>s based on given filter and order. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListFeatureGroups service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListFeatureGroups service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListFeatureGroups">REST API Reference for ListFeatureGroups Operation</seealso> Task<ListFeatureGroupsResponse> ListFeatureGroupsAsync(ListFeatureGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListFlowDefinitions /// <summary> /// Returns information about the flow definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListFlowDefinitions service method.</param> /// /// <returns>The response from the ListFlowDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListFlowDefinitions">REST API Reference for ListFlowDefinitions Operation</seealso> ListFlowDefinitionsResponse ListFlowDefinitions(ListFlowDefinitionsRequest request); /// <summary> /// Returns information about the flow definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListFlowDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListFlowDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListFlowDefinitions">REST API Reference for ListFlowDefinitions Operation</seealso> Task<ListFlowDefinitionsResponse> ListFlowDefinitionsAsync(ListFlowDefinitionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListHumanTaskUis /// <summary> /// Returns information about the human task user interfaces in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListHumanTaskUis service method.</param> /// /// <returns>The response from the ListHumanTaskUis service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHumanTaskUis">REST API Reference for ListHumanTaskUis Operation</seealso> ListHumanTaskUisResponse ListHumanTaskUis(ListHumanTaskUisRequest request); /// <summary> /// Returns information about the human task user interfaces in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListHumanTaskUis service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListHumanTaskUis service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHumanTaskUis">REST API Reference for ListHumanTaskUis Operation</seealso> Task<ListHumanTaskUisResponse> ListHumanTaskUisAsync(ListHumanTaskUisRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListHyperParameterTuningJobs /// <summary> /// Gets a list of <a>HyperParameterTuningJobSummary</a> objects that describe the hyperparameter /// tuning jobs launched in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListHyperParameterTuningJobs service method.</param> /// /// <returns>The response from the ListHyperParameterTuningJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs">REST API Reference for ListHyperParameterTuningJobs Operation</seealso> ListHyperParameterTuningJobsResponse ListHyperParameterTuningJobs(ListHyperParameterTuningJobsRequest request); /// <summary> /// Gets a list of <a>HyperParameterTuningJobSummary</a> objects that describe the hyperparameter /// tuning jobs launched in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListHyperParameterTuningJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListHyperParameterTuningJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs">REST API Reference for ListHyperParameterTuningJobs Operation</seealso> Task<ListHyperParameterTuningJobsResponse> ListHyperParameterTuningJobsAsync(ListHyperParameterTuningJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListImages /// <summary> /// Lists the images in your account and their properties. The list can be filtered by /// creation time or modified time, and whether the image name contains a specified string. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListImages service method.</param> /// /// <returns>The response from the ListImages service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListImages">REST API Reference for ListImages Operation</seealso> ListImagesResponse ListImages(ListImagesRequest request); /// <summary> /// Lists the images in your account and their properties. The list can be filtered by /// creation time or modified time, and whether the image name contains a specified string. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListImages service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListImages service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListImages">REST API Reference for ListImages Operation</seealso> Task<ListImagesResponse> ListImagesAsync(ListImagesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListImageVersions /// <summary> /// Lists the versions of a specified image and their properties. The list can be filtered /// by creation time or modified time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListImageVersions service method.</param> /// /// <returns>The response from the ListImageVersions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListImageVersions">REST API Reference for ListImageVersions Operation</seealso> ListImageVersionsResponse ListImageVersions(ListImageVersionsRequest request); /// <summary> /// Lists the versions of a specified image and their properties. The list can be filtered /// by creation time or modified time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListImageVersions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListImageVersions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListImageVersions">REST API Reference for ListImageVersions Operation</seealso> Task<ListImageVersionsResponse> ListImageVersionsAsync(ListImageVersionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListLabelingJobs /// <summary> /// Gets a list of labeling jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListLabelingJobs service method.</param> /// /// <returns>The response from the ListLabelingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs">REST API Reference for ListLabelingJobs Operation</seealso> ListLabelingJobsResponse ListLabelingJobs(ListLabelingJobsRequest request); /// <summary> /// Gets a list of labeling jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListLabelingJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListLabelingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs">REST API Reference for ListLabelingJobs Operation</seealso> Task<ListLabelingJobsResponse> ListLabelingJobsAsync(ListLabelingJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListLabelingJobsForWorkteam /// <summary> /// Gets a list of labeling jobs assigned to a specified work team. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListLabelingJobsForWorkteam service method.</param> /// /// <returns>The response from the ListLabelingJobsForWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam">REST API Reference for ListLabelingJobsForWorkteam Operation</seealso> ListLabelingJobsForWorkteamResponse ListLabelingJobsForWorkteam(ListLabelingJobsForWorkteamRequest request); /// <summary> /// Gets a list of labeling jobs assigned to a specified work team. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListLabelingJobsForWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListLabelingJobsForWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam">REST API Reference for ListLabelingJobsForWorkteam Operation</seealso> Task<ListLabelingJobsForWorkteamResponse> ListLabelingJobsForWorkteamAsync(ListLabelingJobsForWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModelBiasJobDefinitions /// <summary> /// Lists model bias jobs definitions that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelBiasJobDefinitions service method.</param> /// /// <returns>The response from the ListModelBiasJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelBiasJobDefinitions">REST API Reference for ListModelBiasJobDefinitions Operation</seealso> ListModelBiasJobDefinitionsResponse ListModelBiasJobDefinitions(ListModelBiasJobDefinitionsRequest request); /// <summary> /// Lists model bias jobs definitions that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelBiasJobDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModelBiasJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelBiasJobDefinitions">REST API Reference for ListModelBiasJobDefinitions Operation</seealso> Task<ListModelBiasJobDefinitionsResponse> ListModelBiasJobDefinitionsAsync(ListModelBiasJobDefinitionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModelExplainabilityJobDefinitions /// <summary> /// Lists model explainability job definitions that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelExplainabilityJobDefinitions service method.</param> /// /// <returns>The response from the ListModelExplainabilityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelExplainabilityJobDefinitions">REST API Reference for ListModelExplainabilityJobDefinitions Operation</seealso> ListModelExplainabilityJobDefinitionsResponse ListModelExplainabilityJobDefinitions(ListModelExplainabilityJobDefinitionsRequest request); /// <summary> /// Lists model explainability job definitions that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelExplainabilityJobDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModelExplainabilityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelExplainabilityJobDefinitions">REST API Reference for ListModelExplainabilityJobDefinitions Operation</seealso> Task<ListModelExplainabilityJobDefinitionsResponse> ListModelExplainabilityJobDefinitionsAsync(ListModelExplainabilityJobDefinitionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModelPackageGroups /// <summary> /// Gets a list of the model groups in your Amazon Web Services account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelPackageGroups service method.</param> /// /// <returns>The response from the ListModelPackageGroups service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackageGroups">REST API Reference for ListModelPackageGroups Operation</seealso> ListModelPackageGroupsResponse ListModelPackageGroups(ListModelPackageGroupsRequest request); /// <summary> /// Gets a list of the model groups in your Amazon Web Services account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelPackageGroups service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModelPackageGroups service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackageGroups">REST API Reference for ListModelPackageGroups Operation</seealso> Task<ListModelPackageGroupsResponse> ListModelPackageGroupsAsync(ListModelPackageGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModelPackages /// <summary> /// Lists the model packages that have been created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelPackages service method.</param> /// /// <returns>The response from the ListModelPackages service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages">REST API Reference for ListModelPackages Operation</seealso> ListModelPackagesResponse ListModelPackages(ListModelPackagesRequest request); /// <summary> /// Lists the model packages that have been created. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelPackages service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModelPackages service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages">REST API Reference for ListModelPackages Operation</seealso> Task<ListModelPackagesResponse> ListModelPackagesAsync(ListModelPackagesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModelQualityJobDefinitions /// <summary> /// Gets a list of model quality monitoring job definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelQualityJobDefinitions service method.</param> /// /// <returns>The response from the ListModelQualityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelQualityJobDefinitions">REST API Reference for ListModelQualityJobDefinitions Operation</seealso> ListModelQualityJobDefinitionsResponse ListModelQualityJobDefinitions(ListModelQualityJobDefinitionsRequest request); /// <summary> /// Gets a list of model quality monitoring job definitions in your account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModelQualityJobDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModelQualityJobDefinitions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelQualityJobDefinitions">REST API Reference for ListModelQualityJobDefinitions Operation</seealso> Task<ListModelQualityJobDefinitionsResponse> ListModelQualityJobDefinitionsAsync(ListModelQualityJobDefinitionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListModels /// <summary> /// Lists models created with the <code>CreateModel</code> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModels service method.</param> /// /// <returns>The response from the ListModels service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels">REST API Reference for ListModels Operation</seealso> ListModelsResponse ListModels(ListModelsRequest request); /// <summary> /// Lists models created with the <code>CreateModel</code> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListModels service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListModels service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels">REST API Reference for ListModels Operation</seealso> Task<ListModelsResponse> ListModelsAsync(ListModelsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListMonitoringExecutions /// <summary> /// Returns list of all monitoring job executions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListMonitoringExecutions service method.</param> /// /// <returns>The response from the ListMonitoringExecutions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListMonitoringExecutions">REST API Reference for ListMonitoringExecutions Operation</seealso> ListMonitoringExecutionsResponse ListMonitoringExecutions(ListMonitoringExecutionsRequest request); /// <summary> /// Returns list of all monitoring job executions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListMonitoringExecutions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListMonitoringExecutions service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListMonitoringExecutions">REST API Reference for ListMonitoringExecutions Operation</seealso> Task<ListMonitoringExecutionsResponse> ListMonitoringExecutionsAsync(ListMonitoringExecutionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListMonitoringSchedules /// <summary> /// Returns list of all monitoring schedules. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListMonitoringSchedules service method.</param> /// /// <returns>The response from the ListMonitoringSchedules service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListMonitoringSchedules">REST API Reference for ListMonitoringSchedules Operation</seealso> ListMonitoringSchedulesResponse ListMonitoringSchedules(ListMonitoringSchedulesRequest request); /// <summary> /// Returns list of all monitoring schedules. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListMonitoringSchedules service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListMonitoringSchedules service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListMonitoringSchedules">REST API Reference for ListMonitoringSchedules Operation</seealso> Task<ListMonitoringSchedulesResponse> ListMonitoringSchedulesAsync(ListMonitoringSchedulesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListNotebookInstanceLifecycleConfigs /// <summary> /// Lists notebook instance lifestyle configurations created with the <a>CreateNotebookInstanceLifecycleConfig</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListNotebookInstanceLifecycleConfigs service method.</param> /// /// <returns>The response from the ListNotebookInstanceLifecycleConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs">REST API Reference for ListNotebookInstanceLifecycleConfigs Operation</seealso> ListNotebookInstanceLifecycleConfigsResponse ListNotebookInstanceLifecycleConfigs(ListNotebookInstanceLifecycleConfigsRequest request); /// <summary> /// Lists notebook instance lifestyle configurations created with the <a>CreateNotebookInstanceLifecycleConfig</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListNotebookInstanceLifecycleConfigs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListNotebookInstanceLifecycleConfigs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs">REST API Reference for ListNotebookInstanceLifecycleConfigs Operation</seealso> Task<ListNotebookInstanceLifecycleConfigsResponse> ListNotebookInstanceLifecycleConfigsAsync(ListNotebookInstanceLifecycleConfigsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListNotebookInstances /// <summary> /// Returns a list of the Amazon SageMaker notebook instances in the requester's account /// in an Amazon Web Services Region. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListNotebookInstances service method.</param> /// /// <returns>The response from the ListNotebookInstances service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances">REST API Reference for ListNotebookInstances Operation</seealso> ListNotebookInstancesResponse ListNotebookInstances(ListNotebookInstancesRequest request); /// <summary> /// Returns a list of the Amazon SageMaker notebook instances in the requester's account /// in an Amazon Web Services Region. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListNotebookInstances service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListNotebookInstances service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances">REST API Reference for ListNotebookInstances Operation</seealso> Task<ListNotebookInstancesResponse> ListNotebookInstancesAsync(ListNotebookInstancesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListPipelineExecutions /// <summary> /// Gets a list of the pipeline executions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineExecutions service method.</param> /// /// <returns>The response from the ListPipelineExecutions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineExecutions">REST API Reference for ListPipelineExecutions Operation</seealso> ListPipelineExecutionsResponse ListPipelineExecutions(ListPipelineExecutionsRequest request); /// <summary> /// Gets a list of the pipeline executions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineExecutions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListPipelineExecutions service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineExecutions">REST API Reference for ListPipelineExecutions Operation</seealso> Task<ListPipelineExecutionsResponse> ListPipelineExecutionsAsync(ListPipelineExecutionsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListPipelineExecutionSteps /// <summary> /// Gets a list of <code>PipeLineExecutionStep</code> objects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineExecutionSteps service method.</param> /// /// <returns>The response from the ListPipelineExecutionSteps service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineExecutionSteps">REST API Reference for ListPipelineExecutionSteps Operation</seealso> ListPipelineExecutionStepsResponse ListPipelineExecutionSteps(ListPipelineExecutionStepsRequest request); /// <summary> /// Gets a list of <code>PipeLineExecutionStep</code> objects. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineExecutionSteps service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListPipelineExecutionSteps service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineExecutionSteps">REST API Reference for ListPipelineExecutionSteps Operation</seealso> Task<ListPipelineExecutionStepsResponse> ListPipelineExecutionStepsAsync(ListPipelineExecutionStepsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListPipelineParametersForExecution /// <summary> /// Gets a list of parameters for a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineParametersForExecution service method.</param> /// /// <returns>The response from the ListPipelineParametersForExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineParametersForExecution">REST API Reference for ListPipelineParametersForExecution Operation</seealso> ListPipelineParametersForExecutionResponse ListPipelineParametersForExecution(ListPipelineParametersForExecutionRequest request); /// <summary> /// Gets a list of parameters for a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelineParametersForExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListPipelineParametersForExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelineParametersForExecution">REST API Reference for ListPipelineParametersForExecution Operation</seealso> Task<ListPipelineParametersForExecutionResponse> ListPipelineParametersForExecutionAsync(ListPipelineParametersForExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListPipelines /// <summary> /// Gets a list of pipelines. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelines service method.</param> /// /// <returns>The response from the ListPipelines service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelines">REST API Reference for ListPipelines Operation</seealso> ListPipelinesResponse ListPipelines(ListPipelinesRequest request); /// <summary> /// Gets a list of pipelines. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListPipelines service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListPipelines service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListPipelines">REST API Reference for ListPipelines Operation</seealso> Task<ListPipelinesResponse> ListPipelinesAsync(ListPipelinesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListProcessingJobs /// <summary> /// Lists processing jobs that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProcessingJobs service method.</param> /// /// <returns>The response from the ListProcessingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListProcessingJobs">REST API Reference for ListProcessingJobs Operation</seealso> ListProcessingJobsResponse ListProcessingJobs(ListProcessingJobsRequest request); /// <summary> /// Lists processing jobs that satisfy various filters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProcessingJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListProcessingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListProcessingJobs">REST API Reference for ListProcessingJobs Operation</seealso> Task<ListProcessingJobsResponse> ListProcessingJobsAsync(ListProcessingJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListProjects /// <summary> /// Gets a list of the projects in an Amazon Web Services account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProjects service method.</param> /// /// <returns>The response from the ListProjects service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListProjects">REST API Reference for ListProjects Operation</seealso> ListProjectsResponse ListProjects(ListProjectsRequest request); /// <summary> /// Gets a list of the projects in an Amazon Web Services account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProjects service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListProjects service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListProjects">REST API Reference for ListProjects Operation</seealso> Task<ListProjectsResponse> ListProjectsAsync(ListProjectsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListSubscribedWorkteams /// <summary> /// Gets a list of the work teams that you are subscribed to in the Amazon Web Services /// Marketplace. The list may be empty if no work team satisfies the filter specified /// in the <code>NameContains</code> parameter. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSubscribedWorkteams service method.</param> /// /// <returns>The response from the ListSubscribedWorkteams service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams">REST API Reference for ListSubscribedWorkteams Operation</seealso> ListSubscribedWorkteamsResponse ListSubscribedWorkteams(ListSubscribedWorkteamsRequest request); /// <summary> /// Gets a list of the work teams that you are subscribed to in the Amazon Web Services /// Marketplace. The list may be empty if no work team satisfies the filter specified /// in the <code>NameContains</code> parameter. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListSubscribedWorkteams service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListSubscribedWorkteams service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams">REST API Reference for ListSubscribedWorkteams Operation</seealso> Task<ListSubscribedWorkteamsResponse> ListSubscribedWorkteamsAsync(ListSubscribedWorkteamsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTags /// <summary> /// Returns the tags for the specified Amazon SageMaker resource. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param> /// /// <returns>The response from the ListTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags">REST API Reference for ListTags Operation</seealso> ListTagsResponse ListTags(ListTagsRequest request); /// <summary> /// Returns the tags for the specified Amazon SageMaker resource. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTags service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags">REST API Reference for ListTags Operation</seealso> Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTrainingJobs /// <summary> /// Lists training jobs. /// /// <note> /// <para> /// When <code>StatusEquals</code> and <code>MaxResults</code> are set at the same time, /// the <code>MaxResults</code> number of training jobs are first retrieved ignoring the /// <code>StatusEquals</code> parameter and then they are filtered by the <code>StatusEquals</code> /// parameter, which is returned as a response. /// </para> /// /// <para> /// For example, if <code>ListTrainingJobs</code> is invoked with the following parameters: /// </para> /// /// <para> /// <code>{ ... MaxResults: 100, StatusEquals: InProgress ... }</code> /// </para> /// /// <para> /// First, 100 trainings jobs with any status, including those other than <code>InProgress</code>, /// are selected (sorted according to the creation time, from the most current to the /// oldest). Next, those with a status of <code>InProgress</code> are returned. /// </para> /// /// <para> /// You can quickly test the API using the following Amazon Web Services CLI code. /// </para> /// /// <para> /// <code>aws sagemaker list-training-jobs --max-results 100 --status-equals InProgress</code> /// /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrainingJobs service method.</param> /// /// <returns>The response from the ListTrainingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs">REST API Reference for ListTrainingJobs Operation</seealso> ListTrainingJobsResponse ListTrainingJobs(ListTrainingJobsRequest request); /// <summary> /// Lists training jobs. /// /// <note> /// <para> /// When <code>StatusEquals</code> and <code>MaxResults</code> are set at the same time, /// the <code>MaxResults</code> number of training jobs are first retrieved ignoring the /// <code>StatusEquals</code> parameter and then they are filtered by the <code>StatusEquals</code> /// parameter, which is returned as a response. /// </para> /// /// <para> /// For example, if <code>ListTrainingJobs</code> is invoked with the following parameters: /// </para> /// /// <para> /// <code>{ ... MaxResults: 100, StatusEquals: InProgress ... }</code> /// </para> /// /// <para> /// First, 100 trainings jobs with any status, including those other than <code>InProgress</code>, /// are selected (sorted according to the creation time, from the most current to the /// oldest). Next, those with a status of <code>InProgress</code> are returned. /// </para> /// /// <para> /// You can quickly test the API using the following Amazon Web Services CLI code. /// </para> /// /// <para> /// <code>aws sagemaker list-training-jobs --max-results 100 --status-equals InProgress</code> /// /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrainingJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTrainingJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs">REST API Reference for ListTrainingJobs Operation</seealso> Task<ListTrainingJobsResponse> ListTrainingJobsAsync(ListTrainingJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTrainingJobsForHyperParameterTuningJob /// <summary> /// Gets a list of <a>TrainingJobSummary</a> objects that describe the training jobs that /// a hyperparameter tuning job launched. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrainingJobsForHyperParameterTuningJob service method.</param> /// /// <returns>The response from the ListTrainingJobsForHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob">REST API Reference for ListTrainingJobsForHyperParameterTuningJob Operation</seealso> ListTrainingJobsForHyperParameterTuningJobResponse ListTrainingJobsForHyperParameterTuningJob(ListTrainingJobsForHyperParameterTuningJobRequest request); /// <summary> /// Gets a list of <a>TrainingJobSummary</a> objects that describe the training jobs that /// a hyperparameter tuning job launched. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrainingJobsForHyperParameterTuningJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTrainingJobsForHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob">REST API Reference for ListTrainingJobsForHyperParameterTuningJob Operation</seealso> Task<ListTrainingJobsForHyperParameterTuningJobResponse> ListTrainingJobsForHyperParameterTuningJobAsync(ListTrainingJobsForHyperParameterTuningJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTransformJobs /// <summary> /// Lists transform jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTransformJobs service method.</param> /// /// <returns>The response from the ListTransformJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs">REST API Reference for ListTransformJobs Operation</seealso> ListTransformJobsResponse ListTransformJobs(ListTransformJobsRequest request); /// <summary> /// Lists transform jobs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTransformJobs service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTransformJobs service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs">REST API Reference for ListTransformJobs Operation</seealso> Task<ListTransformJobsResponse> ListTransformJobsAsync(ListTransformJobsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTrialComponents /// <summary> /// Lists the trial components in your account. You can sort the list by trial component /// name or creation time. You can filter the list to show only components that were created /// in a specific time range. You can also filter on one of the following: /// /// <ul> <li> /// <para> /// <code>ExperimentName</code> /// </para> /// </li> <li> /// <para> /// <code>SourceArn</code> /// </para> /// </li> <li> /// <para> /// <code>TrialName</code> /// </para> /// </li> </ul> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrialComponents service method.</param> /// /// <returns>The response from the ListTrialComponents service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrialComponents">REST API Reference for ListTrialComponents Operation</seealso> ListTrialComponentsResponse ListTrialComponents(ListTrialComponentsRequest request); /// <summary> /// Lists the trial components in your account. You can sort the list by trial component /// name or creation time. You can filter the list to show only components that were created /// in a specific time range. You can also filter on one of the following: /// /// <ul> <li> /// <para> /// <code>ExperimentName</code> /// </para> /// </li> <li> /// <para> /// <code>SourceArn</code> /// </para> /// </li> <li> /// <para> /// <code>TrialName</code> /// </para> /// </li> </ul> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrialComponents service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTrialComponents service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrialComponents">REST API Reference for ListTrialComponents Operation</seealso> Task<ListTrialComponentsResponse> ListTrialComponentsAsync(ListTrialComponentsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTrials /// <summary> /// Lists the trials in your account. Specify an experiment name to limit the list to /// the trials that are part of that experiment. Specify a trial component name to limit /// the list to the trials that associated with that trial component. The list can be /// filtered to show only trials that were created in a specific time range. The list /// can be sorted by trial name or creation time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrials service method.</param> /// /// <returns>The response from the ListTrials service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrials">REST API Reference for ListTrials Operation</seealso> ListTrialsResponse ListTrials(ListTrialsRequest request); /// <summary> /// Lists the trials in your account. Specify an experiment name to limit the list to /// the trials that are part of that experiment. Specify a trial component name to limit /// the list to the trials that associated with that trial component. The list can be /// filtered to show only trials that were created in a specific time range. The list /// can be sorted by trial name or creation time. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTrials service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTrials service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrials">REST API Reference for ListTrials Operation</seealso> Task<ListTrialsResponse> ListTrialsAsync(ListTrialsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListUserProfiles /// <summary> /// Lists user profiles. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListUserProfiles service method.</param> /// /// <returns>The response from the ListUserProfiles service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListUserProfiles">REST API Reference for ListUserProfiles Operation</seealso> ListUserProfilesResponse ListUserProfiles(ListUserProfilesRequest request); /// <summary> /// Lists user profiles. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListUserProfiles service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListUserProfiles service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListUserProfiles">REST API Reference for ListUserProfiles Operation</seealso> Task<ListUserProfilesResponse> ListUserProfilesAsync(ListUserProfilesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListWorkforces /// <summary> /// Use this operation to list all private and vendor workforces in an Amazon Web Services /// Region. Note that you can only have one private workforce per Amazon Web Services /// Region. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListWorkforces service method.</param> /// /// <returns>The response from the ListWorkforces service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkforces">REST API Reference for ListWorkforces Operation</seealso> ListWorkforcesResponse ListWorkforces(ListWorkforcesRequest request); /// <summary> /// Use this operation to list all private and vendor workforces in an Amazon Web Services /// Region. Note that you can only have one private workforce per Amazon Web Services /// Region. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListWorkforces service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListWorkforces service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkforces">REST API Reference for ListWorkforces Operation</seealso> Task<ListWorkforcesResponse> ListWorkforcesAsync(ListWorkforcesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListWorkteams /// <summary> /// Gets a list of private work teams that you have defined in a region. The list may /// be empty if no work team satisfies the filter specified in the <code>NameContains</code> /// parameter. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListWorkteams service method.</param> /// /// <returns>The response from the ListWorkteams service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams">REST API Reference for ListWorkteams Operation</seealso> ListWorkteamsResponse ListWorkteams(ListWorkteamsRequest request); /// <summary> /// Gets a list of private work teams that you have defined in a region. The list may /// be empty if no work team satisfies the filter specified in the <code>NameContains</code> /// parameter. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListWorkteams service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListWorkteams service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams">REST API Reference for ListWorkteams Operation</seealso> Task<ListWorkteamsResponse> ListWorkteamsAsync(ListWorkteamsRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutModelPackageGroupPolicy /// <summary> /// Adds a resouce policy to control access to a model group. For information about resoure /// policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html">Identity-based /// policies and resource-based policies</a> in the <i>Amazon Web Services Identity and /// Access Management User Guide.</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutModelPackageGroupPolicy service method.</param> /// /// <returns>The response from the PutModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/PutModelPackageGroupPolicy">REST API Reference for PutModelPackageGroupPolicy Operation</seealso> PutModelPackageGroupPolicyResponse PutModelPackageGroupPolicy(PutModelPackageGroupPolicyRequest request); /// <summary> /// Adds a resouce policy to control access to a model group. For information about resoure /// policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html">Identity-based /// policies and resource-based policies</a> in the <i>Amazon Web Services Identity and /// Access Management User Guide.</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutModelPackageGroupPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the PutModelPackageGroupPolicy service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/PutModelPackageGroupPolicy">REST API Reference for PutModelPackageGroupPolicy Operation</seealso> Task<PutModelPackageGroupPolicyResponse> PutModelPackageGroupPolicyAsync(PutModelPackageGroupPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region RegisterDevices /// <summary> /// Register devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RegisterDevices service method.</param> /// /// <returns>The response from the RegisterDevices service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RegisterDevices">REST API Reference for RegisterDevices Operation</seealso> RegisterDevicesResponse RegisterDevices(RegisterDevicesRequest request); /// <summary> /// Register devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RegisterDevices service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the RegisterDevices service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RegisterDevices">REST API Reference for RegisterDevices Operation</seealso> Task<RegisterDevicesResponse> RegisterDevicesAsync(RegisterDevicesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region RenderUiTemplate /// <summary> /// Renders the UI template so that you can preview the worker's experience. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RenderUiTemplate service method.</param> /// /// <returns>The response from the RenderUiTemplate service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate">REST API Reference for RenderUiTemplate Operation</seealso> RenderUiTemplateResponse RenderUiTemplate(RenderUiTemplateRequest request); /// <summary> /// Renders the UI template so that you can preview the worker's experience. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RenderUiTemplate service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the RenderUiTemplate service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate">REST API Reference for RenderUiTemplate Operation</seealso> Task<RenderUiTemplateResponse> RenderUiTemplateAsync(RenderUiTemplateRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region Search /// <summary> /// Finds Amazon SageMaker resources that match a search query. Matching resources are /// returned as a list of <code>SearchRecord</code> objects in the response. You can sort /// the search results by any resource property in a ascending or descending order. /// /// /// <para> /// You can query against the following value types: numeric, text, Boolean, and timestamp. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the Search service method.</param> /// /// <returns>The response from the Search service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search">REST API Reference for Search Operation</seealso> SearchResponse Search(SearchRequest request); /// <summary> /// Finds Amazon SageMaker resources that match a search query. Matching resources are /// returned as a list of <code>SearchRecord</code> objects in the response. You can sort /// the search results by any resource property in a ascending or descending order. /// /// /// <para> /// You can query against the following value types: numeric, text, Boolean, and timestamp. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the Search service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the Search service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search">REST API Reference for Search Operation</seealso> Task<SearchResponse> SearchAsync(SearchRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region SendPipelineExecutionStepFailure /// <summary> /// Notifies the pipeline that the execution of a callback step failed, along with a message /// describing why. When a callback step is run, the pipeline generates a callback token /// and includes the token in a message sent to Amazon Simple Queue Service (Amazon SQS). /// </summary> /// <param name="request">Container for the necessary parameters to execute the SendPipelineExecutionStepFailure service method.</param> /// /// <returns>The response from the SendPipelineExecutionStepFailure service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/SendPipelineExecutionStepFailure">REST API Reference for SendPipelineExecutionStepFailure Operation</seealso> SendPipelineExecutionStepFailureResponse SendPipelineExecutionStepFailure(SendPipelineExecutionStepFailureRequest request); /// <summary> /// Notifies the pipeline that the execution of a callback step failed, along with a message /// describing why. When a callback step is run, the pipeline generates a callback token /// and includes the token in a message sent to Amazon Simple Queue Service (Amazon SQS). /// </summary> /// <param name="request">Container for the necessary parameters to execute the SendPipelineExecutionStepFailure service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the SendPipelineExecutionStepFailure service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/SendPipelineExecutionStepFailure">REST API Reference for SendPipelineExecutionStepFailure Operation</seealso> Task<SendPipelineExecutionStepFailureResponse> SendPipelineExecutionStepFailureAsync(SendPipelineExecutionStepFailureRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region SendPipelineExecutionStepSuccess /// <summary> /// Notifies the pipeline that the execution of a callback step succeeded and provides /// a list of the step's output parameters. When a callback step is run, the pipeline /// generates a callback token and includes the token in a message sent to Amazon Simple /// Queue Service (Amazon SQS). /// </summary> /// <param name="request">Container for the necessary parameters to execute the SendPipelineExecutionStepSuccess service method.</param> /// /// <returns>The response from the SendPipelineExecutionStepSuccess service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/SendPipelineExecutionStepSuccess">REST API Reference for SendPipelineExecutionStepSuccess Operation</seealso> SendPipelineExecutionStepSuccessResponse SendPipelineExecutionStepSuccess(SendPipelineExecutionStepSuccessRequest request); /// <summary> /// Notifies the pipeline that the execution of a callback step succeeded and provides /// a list of the step's output parameters. When a callback step is run, the pipeline /// generates a callback token and includes the token in a message sent to Amazon Simple /// Queue Service (Amazon SQS). /// </summary> /// <param name="request">Container for the necessary parameters to execute the SendPipelineExecutionStepSuccess service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the SendPipelineExecutionStepSuccess service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/SendPipelineExecutionStepSuccess">REST API Reference for SendPipelineExecutionStepSuccess Operation</seealso> Task<SendPipelineExecutionStepSuccessResponse> SendPipelineExecutionStepSuccessAsync(SendPipelineExecutionStepSuccessRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StartMonitoringSchedule /// <summary> /// Starts a previously stopped monitoring schedule. /// /// <note> /// <para> /// By default, when you successfully create a new schedule, the status of a monitoring /// schedule is <code>scheduled</code>. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartMonitoringSchedule service method.</param> /// /// <returns>The response from the StartMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartMonitoringSchedule">REST API Reference for StartMonitoringSchedule Operation</seealso> StartMonitoringScheduleResponse StartMonitoringSchedule(StartMonitoringScheduleRequest request); /// <summary> /// Starts a previously stopped monitoring schedule. /// /// <note> /// <para> /// By default, when you successfully create a new schedule, the status of a monitoring /// schedule is <code>scheduled</code>. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StartMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartMonitoringSchedule">REST API Reference for StartMonitoringSchedule Operation</seealso> Task<StartMonitoringScheduleResponse> StartMonitoringScheduleAsync(StartMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StartNotebookInstance /// <summary> /// Launches an ML compute instance with the latest version of the libraries and attaches /// your ML storage volume. After configuring the notebook instance, Amazon SageMaker /// sets the notebook instance status to <code>InService</code>. A notebook instance's /// status must be <code>InService</code> before you can connect to your Jupyter notebook. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartNotebookInstance service method.</param> /// /// <returns>The response from the StartNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance">REST API Reference for StartNotebookInstance Operation</seealso> StartNotebookInstanceResponse StartNotebookInstance(StartNotebookInstanceRequest request); /// <summary> /// Launches an ML compute instance with the latest version of the libraries and attaches /// your ML storage volume. After configuring the notebook instance, Amazon SageMaker /// sets the notebook instance status to <code>InService</code>. A notebook instance's /// status must be <code>InService</code> before you can connect to your Jupyter notebook. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StartNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance">REST API Reference for StartNotebookInstance Operation</seealso> Task<StartNotebookInstanceResponse> StartNotebookInstanceAsync(StartNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StartPipelineExecution /// <summary> /// Starts a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartPipelineExecution service method.</param> /// /// <returns>The response from the StartPipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartPipelineExecution">REST API Reference for StartPipelineExecution Operation</seealso> StartPipelineExecutionResponse StartPipelineExecution(StartPipelineExecutionRequest request); /// <summary> /// Starts a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartPipelineExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StartPipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartPipelineExecution">REST API Reference for StartPipelineExecution Operation</seealso> Task<StartPipelineExecutionResponse> StartPipelineExecutionAsync(StartPipelineExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopAutoMLJob /// <summary> /// A method for forcing the termination of a running job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopAutoMLJob service method.</param> /// /// <returns>The response from the StopAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopAutoMLJob">REST API Reference for StopAutoMLJob Operation</seealso> StopAutoMLJobResponse StopAutoMLJob(StopAutoMLJobRequest request); /// <summary> /// A method for forcing the termination of a running job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopAutoMLJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopAutoMLJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopAutoMLJob">REST API Reference for StopAutoMLJob Operation</seealso> Task<StopAutoMLJobResponse> StopAutoMLJobAsync(StopAutoMLJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopCompilationJob /// <summary> /// Stops a model compilation job. /// /// /// <para> /// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This gracefully /// shuts the job down. If the job hasn't stopped, it sends the SIGKILL signal. /// </para> /// /// <para> /// When it receives a <code>StopCompilationJob</code> request, Amazon SageMaker changes /// the <a>CompilationJobSummary$CompilationJobStatus</a> of the job to <code>Stopping</code>. /// After Amazon SageMaker stops the job, it sets the <a>CompilationJobSummary$CompilationJobStatus</a> /// to <code>Stopped</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopCompilationJob service method.</param> /// /// <returns>The response from the StopCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob">REST API Reference for StopCompilationJob Operation</seealso> StopCompilationJobResponse StopCompilationJob(StopCompilationJobRequest request); /// <summary> /// Stops a model compilation job. /// /// /// <para> /// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This gracefully /// shuts the job down. If the job hasn't stopped, it sends the SIGKILL signal. /// </para> /// /// <para> /// When it receives a <code>StopCompilationJob</code> request, Amazon SageMaker changes /// the <a>CompilationJobSummary$CompilationJobStatus</a> of the job to <code>Stopping</code>. /// After Amazon SageMaker stops the job, it sets the <a>CompilationJobSummary$CompilationJobStatus</a> /// to <code>Stopped</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopCompilationJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopCompilationJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob">REST API Reference for StopCompilationJob Operation</seealso> Task<StopCompilationJobResponse> StopCompilationJobAsync(StopCompilationJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopEdgePackagingJob /// <summary> /// Request to stop an edge packaging job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopEdgePackagingJob service method.</param> /// /// <returns>The response from the StopEdgePackagingJob service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopEdgePackagingJob">REST API Reference for StopEdgePackagingJob Operation</seealso> StopEdgePackagingJobResponse StopEdgePackagingJob(StopEdgePackagingJobRequest request); /// <summary> /// Request to stop an edge packaging job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopEdgePackagingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopEdgePackagingJob service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopEdgePackagingJob">REST API Reference for StopEdgePackagingJob Operation</seealso> Task<StopEdgePackagingJobResponse> StopEdgePackagingJobAsync(StopEdgePackagingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopHyperParameterTuningJob /// <summary> /// Stops a running hyperparameter tuning job and all running training jobs that the tuning /// job launched. /// /// /// <para> /// All model artifacts output from the training jobs are stored in Amazon Simple Storage /// Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs /// are still available in CloudWatch. After the tuning job moves to the <code>Stopped</code> /// state, it releases all reserved resources for the tuning job. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopHyperParameterTuningJob service method.</param> /// /// <returns>The response from the StopHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob">REST API Reference for StopHyperParameterTuningJob Operation</seealso> StopHyperParameterTuningJobResponse StopHyperParameterTuningJob(StopHyperParameterTuningJobRequest request); /// <summary> /// Stops a running hyperparameter tuning job and all running training jobs that the tuning /// job launched. /// /// /// <para> /// All model artifacts output from the training jobs are stored in Amazon Simple Storage /// Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs /// are still available in CloudWatch. After the tuning job moves to the <code>Stopped</code> /// state, it releases all reserved resources for the tuning job. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopHyperParameterTuningJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopHyperParameterTuningJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob">REST API Reference for StopHyperParameterTuningJob Operation</seealso> Task<StopHyperParameterTuningJobResponse> StopHyperParameterTuningJobAsync(StopHyperParameterTuningJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopLabelingJob /// <summary> /// Stops a running labeling job. A job that is stopped cannot be restarted. Any results /// obtained before the job is stopped are placed in the Amazon S3 output bucket. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopLabelingJob service method.</param> /// /// <returns>The response from the StopLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob">REST API Reference for StopLabelingJob Operation</seealso> StopLabelingJobResponse StopLabelingJob(StopLabelingJobRequest request); /// <summary> /// Stops a running labeling job. A job that is stopped cannot be restarted. Any results /// obtained before the job is stopped are placed in the Amazon S3 output bucket. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopLabelingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopLabelingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob">REST API Reference for StopLabelingJob Operation</seealso> Task<StopLabelingJobResponse> StopLabelingJobAsync(StopLabelingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopMonitoringSchedule /// <summary> /// Stops a previously started monitoring schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopMonitoringSchedule service method.</param> /// /// <returns>The response from the StopMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopMonitoringSchedule">REST API Reference for StopMonitoringSchedule Operation</seealso> StopMonitoringScheduleResponse StopMonitoringSchedule(StopMonitoringScheduleRequest request); /// <summary> /// Stops a previously started monitoring schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopMonitoringSchedule">REST API Reference for StopMonitoringSchedule Operation</seealso> Task<StopMonitoringScheduleResponse> StopMonitoringScheduleAsync(StopMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopNotebookInstance /// <summary> /// Terminates the ML compute instance. Before terminating the instance, Amazon SageMaker /// disconnects the ML storage volume from it. Amazon SageMaker preserves the ML storage /// volume. Amazon SageMaker stops charging you for the ML compute instance when you call /// <code>StopNotebookInstance</code>. /// /// /// <para> /// To access data on the ML storage volume for a notebook instance that has been terminated, /// call the <code>StartNotebookInstance</code> API. <code>StartNotebookInstance</code> /// launches another ML compute instance, configures it, and attaches the preserved ML /// storage volume so you can continue your work. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopNotebookInstance service method.</param> /// /// <returns>The response from the StopNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance">REST API Reference for StopNotebookInstance Operation</seealso> StopNotebookInstanceResponse StopNotebookInstance(StopNotebookInstanceRequest request); /// <summary> /// Terminates the ML compute instance. Before terminating the instance, Amazon SageMaker /// disconnects the ML storage volume from it. Amazon SageMaker preserves the ML storage /// volume. Amazon SageMaker stops charging you for the ML compute instance when you call /// <code>StopNotebookInstance</code>. /// /// /// <para> /// To access data on the ML storage volume for a notebook instance that has been terminated, /// call the <code>StartNotebookInstance</code> API. <code>StartNotebookInstance</code> /// launches another ML compute instance, configures it, and attaches the preserved ML /// storage volume so you can continue your work. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopNotebookInstance service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance">REST API Reference for StopNotebookInstance Operation</seealso> Task<StopNotebookInstanceResponse> StopNotebookInstanceAsync(StopNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopPipelineExecution /// <summary> /// Stops a pipeline execution. /// /// /// <para> /// <b>Callback Step</b> /// </para> /// /// <para> /// A pipeline execution won't stop while a callback step is running. When you call <code>StopPipelineExecution</code> /// on a pipeline execution with a running callback step, SageMaker Pipelines sends an /// additional Amazon SQS message to the specified SQS queue. The body of the SQS message /// contains a "Status" field which is set to "Stopping". /// </para> /// /// <para> /// You should add logic to your Amazon SQS message consumer to take any needed action /// (for example, resource cleanup) upon receipt of the message followed by a call to /// <code>SendPipelineExecutionStepSuccess</code> or <code>SendPipelineExecutionStepFailure</code>. /// </para> /// /// <para> /// Only when SageMaker Pipelines receives one of these calls will it stop the pipeline /// execution. /// </para> /// /// <para> /// <b>Lambda Step</b> /// </para> /// /// <para> /// A pipeline execution can't be stopped while a lambda step is running because the Lambda /// function invoked by the lambda step can't be stopped. If you attempt to stop the execution /// while the Lambda function is running, the pipeline waits for the Lambda function to /// finish or until the timeout is hit, whichever occurs first, and then stops. If the /// Lambda function finishes, the pipeline execution status is <code>Stopped</code>. If /// the timeout is hit the pipeline execution status is <code>Failed</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopPipelineExecution service method.</param> /// /// <returns>The response from the StopPipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopPipelineExecution">REST API Reference for StopPipelineExecution Operation</seealso> StopPipelineExecutionResponse StopPipelineExecution(StopPipelineExecutionRequest request); /// <summary> /// Stops a pipeline execution. /// /// /// <para> /// <b>Callback Step</b> /// </para> /// /// <para> /// A pipeline execution won't stop while a callback step is running. When you call <code>StopPipelineExecution</code> /// on a pipeline execution with a running callback step, SageMaker Pipelines sends an /// additional Amazon SQS message to the specified SQS queue. The body of the SQS message /// contains a "Status" field which is set to "Stopping". /// </para> /// /// <para> /// You should add logic to your Amazon SQS message consumer to take any needed action /// (for example, resource cleanup) upon receipt of the message followed by a call to /// <code>SendPipelineExecutionStepSuccess</code> or <code>SendPipelineExecutionStepFailure</code>. /// </para> /// /// <para> /// Only when SageMaker Pipelines receives one of these calls will it stop the pipeline /// execution. /// </para> /// /// <para> /// <b>Lambda Step</b> /// </para> /// /// <para> /// A pipeline execution can't be stopped while a lambda step is running because the Lambda /// function invoked by the lambda step can't be stopped. If you attempt to stop the execution /// while the Lambda function is running, the pipeline waits for the Lambda function to /// finish or until the timeout is hit, whichever occurs first, and then stops. If the /// Lambda function finishes, the pipeline execution status is <code>Stopped</code>. If /// the timeout is hit the pipeline execution status is <code>Failed</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopPipelineExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopPipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopPipelineExecution">REST API Reference for StopPipelineExecution Operation</seealso> Task<StopPipelineExecutionResponse> StopPipelineExecutionAsync(StopPipelineExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopProcessingJob /// <summary> /// Stops a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopProcessingJob service method.</param> /// /// <returns>The response from the StopProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopProcessingJob">REST API Reference for StopProcessingJob Operation</seealso> StopProcessingJobResponse StopProcessingJob(StopProcessingJobRequest request); /// <summary> /// Stops a processing job. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopProcessingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopProcessingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopProcessingJob">REST API Reference for StopProcessingJob Operation</seealso> Task<StopProcessingJobResponse> StopProcessingJobAsync(StopProcessingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopTrainingJob /// <summary> /// Stops a training job. To stop a job, Amazon SageMaker sends the algorithm the <code>SIGTERM</code> /// signal, which delays job termination for 120 seconds. Algorithms might use this 120-second /// window to save the model artifacts, so the results of the training is not lost. /// /// /// <para> /// When it receives a <code>StopTrainingJob</code> request, Amazon SageMaker changes /// the status of the job to <code>Stopping</code>. After Amazon SageMaker stops the job, /// it sets the status to <code>Stopped</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopTrainingJob service method.</param> /// /// <returns>The response from the StopTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob">REST API Reference for StopTrainingJob Operation</seealso> StopTrainingJobResponse StopTrainingJob(StopTrainingJobRequest request); /// <summary> /// Stops a training job. To stop a job, Amazon SageMaker sends the algorithm the <code>SIGTERM</code> /// signal, which delays job termination for 120 seconds. Algorithms might use this 120-second /// window to save the model artifacts, so the results of the training is not lost. /// /// /// <para> /// When it receives a <code>StopTrainingJob</code> request, Amazon SageMaker changes /// the status of the job to <code>Stopping</code>. After Amazon SageMaker stops the job, /// it sets the status to <code>Stopped</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopTrainingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob">REST API Reference for StopTrainingJob Operation</seealso> Task<StopTrainingJobResponse> StopTrainingJobAsync(StopTrainingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopTransformJob /// <summary> /// Stops a transform job. /// /// /// <para> /// When Amazon SageMaker receives a <code>StopTransformJob</code> request, the status /// of the job changes to <code>Stopping</code>. After Amazon SageMaker stops the job, /// the status is set to <code>Stopped</code>. When you stop a transform job before it /// is completed, Amazon SageMaker doesn't store the job's output in Amazon S3. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopTransformJob service method.</param> /// /// <returns>The response from the StopTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob">REST API Reference for StopTransformJob Operation</seealso> StopTransformJobResponse StopTransformJob(StopTransformJobRequest request); /// <summary> /// Stops a transform job. /// /// /// <para> /// When Amazon SageMaker receives a <code>StopTransformJob</code> request, the status /// of the job changes to <code>Stopping</code>. After Amazon SageMaker stops the job, /// the status is set to <code>Stopped</code>. When you stop a transform job before it /// is completed, Amazon SageMaker doesn't store the job's output in Amazon S3. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopTransformJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopTransformJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob">REST API Reference for StopTransformJob Operation</seealso> Task<StopTransformJobResponse> StopTransformJobAsync(StopTransformJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateAction /// <summary> /// Updates an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateAction service method.</param> /// /// <returns>The response from the UpdateAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateAction">REST API Reference for UpdateAction Operation</seealso> UpdateActionResponse UpdateAction(UpdateActionRequest request); /// <summary> /// Updates an action. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateAction service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateAction service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateAction">REST API Reference for UpdateAction Operation</seealso> Task<UpdateActionResponse> UpdateActionAsync(UpdateActionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateAppImageConfig /// <summary> /// Updates the properties of an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateAppImageConfig service method.</param> /// /// <returns>The response from the UpdateAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateAppImageConfig">REST API Reference for UpdateAppImageConfig Operation</seealso> UpdateAppImageConfigResponse UpdateAppImageConfig(UpdateAppImageConfigRequest request); /// <summary> /// Updates the properties of an AppImageConfig. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateAppImageConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateAppImageConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateAppImageConfig">REST API Reference for UpdateAppImageConfig Operation</seealso> Task<UpdateAppImageConfigResponse> UpdateAppImageConfigAsync(UpdateAppImageConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateArtifact /// <summary> /// Updates an artifact. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateArtifact service method.</param> /// /// <returns>The response from the UpdateArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateArtifact">REST API Reference for UpdateArtifact Operation</seealso> UpdateArtifactResponse UpdateArtifact(UpdateArtifactRequest request); /// <summary> /// Updates an artifact. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateArtifact service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateArtifact service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateArtifact">REST API Reference for UpdateArtifact Operation</seealso> Task<UpdateArtifactResponse> UpdateArtifactAsync(UpdateArtifactRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateCodeRepository /// <summary> /// Updates the specified Git repository with the specified values. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateCodeRepository service method.</param> /// /// <returns>The response from the UpdateCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository">REST API Reference for UpdateCodeRepository Operation</seealso> UpdateCodeRepositoryResponse UpdateCodeRepository(UpdateCodeRepositoryRequest request); /// <summary> /// Updates the specified Git repository with the specified values. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateCodeRepository service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateCodeRepository service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository">REST API Reference for UpdateCodeRepository Operation</seealso> Task<UpdateCodeRepositoryResponse> UpdateCodeRepositoryAsync(UpdateCodeRepositoryRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateContext /// <summary> /// Updates a context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateContext service method.</param> /// /// <returns>The response from the UpdateContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateContext">REST API Reference for UpdateContext Operation</seealso> UpdateContextResponse UpdateContext(UpdateContextRequest request); /// <summary> /// Updates a context. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateContext service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateContext service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateContext">REST API Reference for UpdateContext Operation</seealso> Task<UpdateContextResponse> UpdateContextAsync(UpdateContextRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateDeviceFleet /// <summary> /// Updates a fleet of devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDeviceFleet service method.</param> /// /// <returns>The response from the UpdateDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDeviceFleet">REST API Reference for UpdateDeviceFleet Operation</seealso> UpdateDeviceFleetResponse UpdateDeviceFleet(UpdateDeviceFleetRequest request); /// <summary> /// Updates a fleet of devices. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDeviceFleet service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateDeviceFleet service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDeviceFleet">REST API Reference for UpdateDeviceFleet Operation</seealso> Task<UpdateDeviceFleetResponse> UpdateDeviceFleetAsync(UpdateDeviceFleetRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateDevices /// <summary> /// Updates one or more devices in a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDevices service method.</param> /// /// <returns>The response from the UpdateDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDevices">REST API Reference for UpdateDevices Operation</seealso> UpdateDevicesResponse UpdateDevices(UpdateDevicesRequest request); /// <summary> /// Updates one or more devices in a fleet. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDevices service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateDevices service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDevices">REST API Reference for UpdateDevices Operation</seealso> Task<UpdateDevicesResponse> UpdateDevicesAsync(UpdateDevicesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateDomain /// <summary> /// Updates the default settings for new user profiles in the domain. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDomain service method.</param> /// /// <returns>The response from the UpdateDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDomain">REST API Reference for UpdateDomain Operation</seealso> UpdateDomainResponse UpdateDomain(UpdateDomainRequest request); /// <summary> /// Updates the default settings for new user profiles in the domain. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDomain service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateDomain service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateDomain">REST API Reference for UpdateDomain Operation</seealso> Task<UpdateDomainResponse> UpdateDomainAsync(UpdateDomainRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateEndpoint /// <summary> /// Deploys the new <code>EndpointConfig</code> specified in the request, switches to /// using newly created endpoint, and then deletes resources provisioned for the endpoint /// using the previous <code>EndpointConfig</code> (there is no availability loss). /// /// /// <para> /// When Amazon SageMaker receives the request, it sets the endpoint status to <code>Updating</code>. /// After updating the endpoint, it sets the status to <code>InService</code>. To check /// the status of an endpoint, use the <a>DescribeEndpoint</a> API. /// </para> /// <note> /// <para> /// You must not delete an <code>EndpointConfig</code> in use by an endpoint that is live /// or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations /// are being performed on the endpoint. To update an endpoint, you must create a new /// <code>EndpointConfig</code>. /// </para> /// /// <para> /// If you delete the <code>EndpointConfig</code> of an endpoint that is active or being /// created or updated you may lose visibility into the instance type the endpoint is /// using. The endpoint must be deleted in order to stop incurring charges. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateEndpoint service method.</param> /// /// <returns>The response from the UpdateEndpoint service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint">REST API Reference for UpdateEndpoint Operation</seealso> UpdateEndpointResponse UpdateEndpoint(UpdateEndpointRequest request); /// <summary> /// Deploys the new <code>EndpointConfig</code> specified in the request, switches to /// using newly created endpoint, and then deletes resources provisioned for the endpoint /// using the previous <code>EndpointConfig</code> (there is no availability loss). /// /// /// <para> /// When Amazon SageMaker receives the request, it sets the endpoint status to <code>Updating</code>. /// After updating the endpoint, it sets the status to <code>InService</code>. To check /// the status of an endpoint, use the <a>DescribeEndpoint</a> API. /// </para> /// <note> /// <para> /// You must not delete an <code>EndpointConfig</code> in use by an endpoint that is live /// or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations /// are being performed on the endpoint. To update an endpoint, you must create a new /// <code>EndpointConfig</code>. /// </para> /// /// <para> /// If you delete the <code>EndpointConfig</code> of an endpoint that is active or being /// created or updated you may lose visibility into the instance type the endpoint is /// using. The endpoint must be deleted in order to stop incurring charges. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateEndpoint service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateEndpoint service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint">REST API Reference for UpdateEndpoint Operation</seealso> Task<UpdateEndpointResponse> UpdateEndpointAsync(UpdateEndpointRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateEndpointWeightsAndCapacities /// <summary> /// Updates variant weight of one or more variants associated with an existing endpoint, /// or capacity of one variant associated with an existing endpoint. When it receives /// the request, Amazon SageMaker sets the endpoint status to <code>Updating</code>. After /// updating the endpoint, it sets the status to <code>InService</code>. To check the /// status of an endpoint, use the <a>DescribeEndpoint</a> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateEndpointWeightsAndCapacities service method.</param> /// /// <returns>The response from the UpdateEndpointWeightsAndCapacities service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities">REST API Reference for UpdateEndpointWeightsAndCapacities Operation</seealso> UpdateEndpointWeightsAndCapacitiesResponse UpdateEndpointWeightsAndCapacities(UpdateEndpointWeightsAndCapacitiesRequest request); /// <summary> /// Updates variant weight of one or more variants associated with an existing endpoint, /// or capacity of one variant associated with an existing endpoint. When it receives /// the request, Amazon SageMaker sets the endpoint status to <code>Updating</code>. After /// updating the endpoint, it sets the status to <code>InService</code>. To check the /// status of an endpoint, use the <a>DescribeEndpoint</a> API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateEndpointWeightsAndCapacities service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateEndpointWeightsAndCapacities service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities">REST API Reference for UpdateEndpointWeightsAndCapacities Operation</seealso> Task<UpdateEndpointWeightsAndCapacitiesResponse> UpdateEndpointWeightsAndCapacitiesAsync(UpdateEndpointWeightsAndCapacitiesRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateExperiment /// <summary> /// Adds, updates, or removes the description of an experiment. Updates the display name /// of an experiment. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateExperiment service method.</param> /// /// <returns>The response from the UpdateExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateExperiment">REST API Reference for UpdateExperiment Operation</seealso> UpdateExperimentResponse UpdateExperiment(UpdateExperimentRequest request); /// <summary> /// Adds, updates, or removes the description of an experiment. Updates the display name /// of an experiment. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateExperiment service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateExperiment service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateExperiment">REST API Reference for UpdateExperiment Operation</seealso> Task<UpdateExperimentResponse> UpdateExperimentAsync(UpdateExperimentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateImage /// <summary> /// Updates the properties of a SageMaker image. To change the image's tags, use the <a>AddTags</a> /// and <a>DeleteTags</a> APIs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateImage service method.</param> /// /// <returns>The response from the UpdateImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateImage">REST API Reference for UpdateImage Operation</seealso> UpdateImageResponse UpdateImage(UpdateImageRequest request); /// <summary> /// Updates the properties of a SageMaker image. To change the image's tags, use the <a>AddTags</a> /// and <a>DeleteTags</a> APIs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateImage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateImage service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateImage">REST API Reference for UpdateImage Operation</seealso> Task<UpdateImageResponse> UpdateImageAsync(UpdateImageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateModelPackage /// <summary> /// Updates a versioned model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateModelPackage service method.</param> /// /// <returns>The response from the UpdateModelPackage service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateModelPackage">REST API Reference for UpdateModelPackage Operation</seealso> UpdateModelPackageResponse UpdateModelPackage(UpdateModelPackageRequest request); /// <summary> /// Updates a versioned model. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateModelPackage service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateModelPackage service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateModelPackage">REST API Reference for UpdateModelPackage Operation</seealso> Task<UpdateModelPackageResponse> UpdateModelPackageAsync(UpdateModelPackageRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateMonitoringSchedule /// <summary> /// Updates a previously created schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateMonitoringSchedule service method.</param> /// /// <returns>The response from the UpdateMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateMonitoringSchedule">REST API Reference for UpdateMonitoringSchedule Operation</seealso> UpdateMonitoringScheduleResponse UpdateMonitoringSchedule(UpdateMonitoringScheduleRequest request); /// <summary> /// Updates a previously created schedule. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateMonitoringSchedule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateMonitoringSchedule service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateMonitoringSchedule">REST API Reference for UpdateMonitoringSchedule Operation</seealso> Task<UpdateMonitoringScheduleResponse> UpdateMonitoringScheduleAsync(UpdateMonitoringScheduleRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateNotebookInstance /// <summary> /// Updates a notebook instance. NotebookInstance updates include upgrading or downgrading /// the ML compute instance used for your notebook instance to accommodate changes in /// your workload requirements. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateNotebookInstance service method.</param> /// /// <returns>The response from the UpdateNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance">REST API Reference for UpdateNotebookInstance Operation</seealso> UpdateNotebookInstanceResponse UpdateNotebookInstance(UpdateNotebookInstanceRequest request); /// <summary> /// Updates a notebook instance. NotebookInstance updates include upgrading or downgrading /// the ML compute instance used for your notebook instance to accommodate changes in /// your workload requirements. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateNotebookInstance service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateNotebookInstance service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance">REST API Reference for UpdateNotebookInstance Operation</seealso> Task<UpdateNotebookInstanceResponse> UpdateNotebookInstanceAsync(UpdateNotebookInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateNotebookInstanceLifecycleConfig /// <summary> /// Updates a notebook instance lifecycle configuration created with the <a>CreateNotebookInstanceLifecycleConfig</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateNotebookInstanceLifecycleConfig service method.</param> /// /// <returns>The response from the UpdateNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig">REST API Reference for UpdateNotebookInstanceLifecycleConfig Operation</seealso> UpdateNotebookInstanceLifecycleConfigResponse UpdateNotebookInstanceLifecycleConfig(UpdateNotebookInstanceLifecycleConfigRequest request); /// <summary> /// Updates a notebook instance lifecycle configuration created with the <a>CreateNotebookInstanceLifecycleConfig</a> /// API. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateNotebookInstanceLifecycleConfig service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateNotebookInstanceLifecycleConfig service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig">REST API Reference for UpdateNotebookInstanceLifecycleConfig Operation</seealso> Task<UpdateNotebookInstanceLifecycleConfigResponse> UpdateNotebookInstanceLifecycleConfigAsync(UpdateNotebookInstanceLifecycleConfigRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdatePipeline /// <summary> /// Updates a pipeline. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdatePipeline service method.</param> /// /// <returns>The response from the UpdatePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdatePipeline">REST API Reference for UpdatePipeline Operation</seealso> UpdatePipelineResponse UpdatePipeline(UpdatePipelineRequest request); /// <summary> /// Updates a pipeline. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdatePipeline service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdatePipeline service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdatePipeline">REST API Reference for UpdatePipeline Operation</seealso> Task<UpdatePipelineResponse> UpdatePipelineAsync(UpdatePipelineRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdatePipelineExecution /// <summary> /// Updates a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdatePipelineExecution service method.</param> /// /// <returns>The response from the UpdatePipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdatePipelineExecution">REST API Reference for UpdatePipelineExecution Operation</seealso> UpdatePipelineExecutionResponse UpdatePipelineExecution(UpdatePipelineExecutionRequest request); /// <summary> /// Updates a pipeline execution. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdatePipelineExecution service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdatePipelineExecution service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdatePipelineExecution">REST API Reference for UpdatePipelineExecution Operation</seealso> Task<UpdatePipelineExecutionResponse> UpdatePipelineExecutionAsync(UpdatePipelineExecutionRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateTrainingJob /// <summary> /// Update a model training job to request a new Debugger profiling configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrainingJob service method.</param> /// /// <returns>The response from the UpdateTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrainingJob">REST API Reference for UpdateTrainingJob Operation</seealso> UpdateTrainingJobResponse UpdateTrainingJob(UpdateTrainingJobRequest request); /// <summary> /// Update a model training job to request a new Debugger profiling configuration. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrainingJob service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateTrainingJob service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrainingJob">REST API Reference for UpdateTrainingJob Operation</seealso> Task<UpdateTrainingJobResponse> UpdateTrainingJobAsync(UpdateTrainingJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateTrial /// <summary> /// Updates the display name of a trial. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrial service method.</param> /// /// <returns>The response from the UpdateTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrial">REST API Reference for UpdateTrial Operation</seealso> UpdateTrialResponse UpdateTrial(UpdateTrialRequest request); /// <summary> /// Updates the display name of a trial. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrial service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateTrial service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrial">REST API Reference for UpdateTrial Operation</seealso> Task<UpdateTrialResponse> UpdateTrialAsync(UpdateTrialRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateTrialComponent /// <summary> /// Updates one or more properties of a trial component. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrialComponent service method.</param> /// /// <returns>The response from the UpdateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrialComponent">REST API Reference for UpdateTrialComponent Operation</seealso> UpdateTrialComponentResponse UpdateTrialComponent(UpdateTrialComponentRequest request); /// <summary> /// Updates one or more properties of a trial component. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrialComponent service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateTrialComponent service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ConflictException"> /// There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> /// or <code>Artifact</code>. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateTrialComponent">REST API Reference for UpdateTrialComponent Operation</seealso> Task<UpdateTrialComponentResponse> UpdateTrialComponentAsync(UpdateTrialComponentRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateUserProfile /// <summary> /// Updates a user profile. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateUserProfile service method.</param> /// /// <returns>The response from the UpdateUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateUserProfile">REST API Reference for UpdateUserProfile Operation</seealso> UpdateUserProfileResponse UpdateUserProfile(UpdateUserProfileRequest request); /// <summary> /// Updates a user profile. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateUserProfile service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateUserProfile service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceInUseException"> /// Resource being accessed is in use. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <exception cref="Amazon.SageMaker.Model.ResourceNotFoundException"> /// Resource being access is not found. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateUserProfile">REST API Reference for UpdateUserProfile Operation</seealso> Task<UpdateUserProfileResponse> UpdateUserProfileAsync(UpdateUserProfileRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateWorkforce /// <summary> /// Use this operation to update your workforce. You can use this operation to require /// that workers use specific IP addresses to work on tasks and to update your OpenID /// Connect (OIDC) Identity Provider (IdP) workforce configuration. /// /// /// <para> /// Use <code>SourceIpConfig</code> to restrict worker access to tasks to a specific /// range of IP addresses. You specify allowed IP addresses by creating a list of up to /// ten <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">CIDRs</a>. /// By default, a workforce isn't restricted to specific IP addresses. If you specify /// a range of IP addresses, workers who attempt to access tasks using any IP address /// outside the specified range are denied and get a <code>Not Found</code> error message /// on the worker portal. /// </para> /// /// <para> /// Use <code>OidcConfig</code> to update the configuration of a workforce created using /// your own OIDC IdP. /// </para> /// <important> /// <para> /// You can only update your OIDC IdP configuration when there are no work teams associated /// with your workforce. You can delete work teams using the operation. /// </para> /// </important> /// <para> /// After restricting access to a range of IP addresses or updating your OIDC IdP configuration /// with this operation, you can view details about your update workforce using the operation. /// </para> /// <important> /// <para> /// This operation only applies to private workforces. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateWorkforce service method.</param> /// /// <returns>The response from the UpdateWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkforce">REST API Reference for UpdateWorkforce Operation</seealso> UpdateWorkforceResponse UpdateWorkforce(UpdateWorkforceRequest request); /// <summary> /// Use this operation to update your workforce. You can use this operation to require /// that workers use specific IP addresses to work on tasks and to update your OpenID /// Connect (OIDC) Identity Provider (IdP) workforce configuration. /// /// /// <para> /// Use <code>SourceIpConfig</code> to restrict worker access to tasks to a specific /// range of IP addresses. You specify allowed IP addresses by creating a list of up to /// ten <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">CIDRs</a>. /// By default, a workforce isn't restricted to specific IP addresses. If you specify /// a range of IP addresses, workers who attempt to access tasks using any IP address /// outside the specified range are denied and get a <code>Not Found</code> error message /// on the worker portal. /// </para> /// /// <para> /// Use <code>OidcConfig</code> to update the configuration of a workforce created using /// your own OIDC IdP. /// </para> /// <important> /// <para> /// You can only update your OIDC IdP configuration when there are no work teams associated /// with your workforce. You can delete work teams using the operation. /// </para> /// </important> /// <para> /// After restricting access to a range of IP addresses or updating your OIDC IdP configuration /// with this operation, you can view details about your update workforce using the operation. /// </para> /// <important> /// <para> /// This operation only applies to private workforces. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateWorkforce service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateWorkforce service method, as returned by SageMaker.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkforce">REST API Reference for UpdateWorkforce Operation</seealso> Task<UpdateWorkforceResponse> UpdateWorkforceAsync(UpdateWorkforceRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UpdateWorkteam /// <summary> /// Updates an existing work team with new member definitions or description. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateWorkteam service method.</param> /// /// <returns>The response from the UpdateWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam">REST API Reference for UpdateWorkteam Operation</seealso> UpdateWorkteamResponse UpdateWorkteam(UpdateWorkteamRequest request); /// <summary> /// Updates an existing work team with new member definitions or description. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateWorkteam service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateWorkteam service method, as returned by SageMaker.</returns> /// <exception cref="Amazon.SageMaker.Model.ResourceLimitExceededException"> /// You have exceeded an Amazon SageMaker resource limit. For example, you might have /// too many training jobs created. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam">REST API Reference for UpdateWorkteam Operation</seealso> Task<UpdateWorkteamResponse> UpdateWorkteamAsync(UpdateWorkteamRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion } }
56.563221
238
0.670978
[ "Apache-2.0" ]
ebattalio/aws-sdk-net
sdk/src/Services/SageMaker/Generated/_bcl45/IAmazonSageMaker.cs
598,552
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using IdentityServer.Legacy; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.WebUtilities; namespace IdentityServer.Areas.Identity.Pages.Account { [AllowAnonymous] public class ConfirmEmailModel : PageModel { private readonly UserManager<ApplicationUser> _userManager; public ConfirmEmailModel(UserManager<ApplicationUser> userManager) { _userManager = userManager; } [TempData] public string StatusMessage { get; set; } public async Task<IActionResult> OnGetAsync(string userId, string code) { if (userId == null || code == null) { return RedirectToPage("/Index"); } var user = await _userManager.FindByIdAsync(userId); if (user == null) { return NotFound($"Unable to load user with ID '{userId}'."); } code = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(code)); var result = await _userManager.ConfirmEmailAsync(user, code); StatusMessage = result.Succeeded ? "Thank you for confirming your email." : "Error confirming your email."; return Page(); } } }
30.895833
119
0.648011
[ "Apache-2.0" ]
jugstalt/identityserver-legacy
is4/IdentityServer/Areas/Identity/Pages/Account/ConfirmEmail.cshtml.cs
1,485
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace IDG { public abstract class ProtocolBase { public abstract ProtocolBase InitMessage(byte[] bytes); public abstract int Length { get; } public abstract byte[] GetByteStream(); public abstract void push(Int32 int32); public abstract void push(Int64 int64); public abstract void push(UInt16 uint16); public abstract void push(Byte uint8); public abstract void push(Boolean boolean); //public abstract void push(V2 v2); public abstract void push(String str); public abstract void push(Byte[] bytes); //public abstract bool InitNext(byte[] bytes); public abstract Int32 getInt32(); public abstract Int64 getInt64(); public abstract UInt16 getUInt16(); public abstract Byte getByte(); public abstract Boolean getBoolean(); //public abstract V2 getV2(); public abstract String getString(); public abstract Byte[] getLastBytes(); } public class ByteProtocol : ProtocolBase { protected List<Byte> byteList = new List<byte>(); protected byte[] bytes; protected int index = 0; protected int lastOffset = 0; protected UInt16 strLength = 0; protected byte[] tempBytes; public override int Length { get { return bytes.Length - (index + lastOffset); } } public override byte[] GetByteStream() { // push(byteList.Count); // bytes = byteList.ToArray(); // bytes = byteList.ToArray(); return byteList.ToArray(); } public override int getInt32() { index += lastOffset; lastOffset = 4; return BitConverter.ToInt32(bytes, index); } public override long getInt64() { index += lastOffset; lastOffset = 8; return BitConverter.ToInt64(bytes, index); } public override string getString() { strLength = getUInt16(); index += lastOffset; lastOffset = strLength; return Encoding.Unicode.GetString(bytes, index, strLength); } public override ushort getUInt16() { index += lastOffset; lastOffset = 2; return BitConverter.ToUInt16(bytes, index); } public override ProtocolBase InitMessage(byte[] bytes) { this.bytes = bytes; index = 0; strLength = 0; lastOffset = 0; return this; } public override void push(int int32) { byteList.AddRange(BitConverter.GetBytes(int32)); } public override void push(long int64) { byteList.AddRange(BitConverter.GetBytes(int64)); } public override void push(ushort uint16) { byteList.AddRange(BitConverter.GetBytes(uint16)); } public override void push(byte uint8) { byteList.Add(uint8); } public override void push(bool boolean) { byteList.Add(boolean ? (byte)1 : (byte)0); } public override bool getBoolean() { return getByte() == 1; } public override byte getByte() { index += lastOffset; lastOffset = 1; return bytes[index]; } public override void push(string str) { tempBytes = Encoding.Unicode.GetBytes(str); strLength = (UInt16)tempBytes.Length; push(strLength); byteList.AddRange(tempBytes); } //public override void push(V2 v2) //{ // push(v2.x.ToPrecisionInt()); // push(v2.y.ToPrecisionInt()); //} //public override V2 getV2() //{ // Ratio r1 = getRatio(), r2 = getRatio(); // return new V2(r1, r2); //} public override void push(byte[] bytes) { if (bytes==null|| bytes.Length == 0) return; byteList.AddRange(bytes); } public override byte[] getLastBytes() { index += lastOffset; lastOffset = bytes.Length - index; byte[] temp = new byte[lastOffset]; Array.Copy(bytes, index, temp, 0, lastOffset); return temp; } } }
26.818713
90
0.54034
[ "Apache-2.0" ]
QinZhuo/IDG_FightServer
IDG_FightServer/Protocol.cs
4,588
C#
using AppTokiota.Users.Models; using Microsoft.AppCenter.Crashes; using Polly; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace AppTokiota.Users.Services { public class ReviewService : IReviewService, ISubscribeMessagingCenter { private IRequestService _requestService; private ICacheEntity _cacheService; private IAuthenticationService _authenticationService; public ReviewService(IRequestService requestService, ICacheEntity cacheService, IAuthenticationService authentication) { _cacheService = cacheService; _requestService = requestService; _authenticationService = authentication; } public async Task<Review> GetReview (int year, int month) { try { Review review = await _cacheService.GetObjectAsync<Review>($"/{year}/{month}/review"); if (review == null) { var nowLess3Month = DateTime.Now.AddMonths(-3); var requestDate = new DateTime(year, month, 1); var url = $"{AppSettings.TimesheetUrlEndPoint}/{year}/{month}/review"; review = await Policy.Handle<Exception>() .WaitAndRetryAsync(1, retryAtemp => TimeSpan.FromMilliseconds(100), async (exception, timeSpan, retryCount, context) => { await _authenticationService.UserIsAuthenticatedAndValidAsync(true); }) .ExecuteAsync<Review>(async () => { return await _requestService.GetAsync<Review>(url, AppSettings.AuthenticatedUserResponse.AccessToken); }); if (requestDate < nowLess3Month) { await _cacheService.InsertObjectAsync($"/{year}/{month}/review", review); } } return review; } catch (Exception e) { MessagingCenter.Send<ISubscribeMessagingCenter>(this, nameof(UnauthorizedAccessException)); Crashes.TrackError(e); throw e; } } public async Task<bool> PatchReview(int year, int month) { try { if (!AppSettings.SendReview) return true; var reviewDatos = new Review(); var url = $"{AppSettings.TimesheetUrlEndPoint}/{year}/{month}/review"; var response = await Policy.Handle<Exception>() .WaitAndRetryAsync(1, retryAtemp => TimeSpan.FromMilliseconds(100), async (exception, timeSpan, retryCount, context) => { await _authenticationService.UserIsAuthenticatedAndValidAsync(true); }) .ExecuteAsync<bool>(async () => { return await _requestService.PatchAsync<bool>(url, AppSettings.AuthenticatedUserResponse.AccessToken); }); return response; } catch (Exception e) { MessagingCenter.Send<ISubscribeMessagingCenter>(this, nameof(UnauthorizedAccessException)); Crashes.TrackError(e); throw e; } } } }
40.033333
225
0.547599
[ "MIT" ]
ioadres/AppTokiota
AppTokiota.Users/Services/Review/ReviewService.cs
3,605
C#
using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using AleFIT.Workflow.Core; using AleFIT.Workflow.Test.TestData; namespace AleFIT.Workflow.Test.Mocks { public class DecrementNode : IExecutable<GenericContext<int>> { public Task<ExecutionContext<GenericContext<int>>> ExecuteAsync(ExecutionContext<GenericContext<int>> context) { context.Data.SampleData--; return Task.FromResult(context); } } }
25.35
118
0.712032
[ "MIT" ]
alefgroup/AleFIT.Workflow
AleFIT.Workflow.Test/Mocks/DecrementNode.cs
509
C#
using SPICA.Formats.Common; using System.IO; using System.Text; using SPICA.Formats.GFL2.Texture; using SPICA.Formats.CtrH3D; using System.Collections.Generic; using System.Linq; namespace SPICA.WinForms.Formats { class GFPackedTexture { private List<GFTexture> Textures; public GFPackedTexture() { Textures = new List<GFTexture>(); } public GFPackedTexture(H3D Scene, int index = -1) : this() { if (index >= 0) { Textures.Add(new GFTexture(Scene.Textures[index])); } else { foreach (var t in Scene.Textures) Textures.Add(new GFTexture(t)); } } public static H3D OpenAsH3D(Stream Input, GFPackage.Header Header, int StartIndex) { H3D Output = new H3D(); //Textures and animations for (int i = StartIndex; i < Header.Entries.Length; i++) { byte[] Buffer = new byte[Header.Entries[i].Length]; Input.Seek(Header.Entries[i].Address, SeekOrigin.Begin); Input.Read(Buffer, 0, Buffer.Length); if (Buffer.Length > 4 && Buffer[0] == 0 && Buffer[1] == 0 && Buffer[2] == 1 && Buffer[3] == 0) { Output.Merge(new SPICA.Formats.GFL2.GFModelPack(new MemoryStream(Buffer)).ToH3D()); } if (Buffer.Length < 4 || Encoding.ASCII.GetString(Buffer, 0, 4) != "BCH\0") continue; using (MemoryStream MS = new MemoryStream(Buffer)) { Output.Merge(H3D.Open(MS)); } } return Output; } public void Save(string FileName) { using (var frm = new FrmGFTFormat()) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { using (BinaryWriter br = new BinaryWriter(new FileStream(FileName + (frm.Format == 0 ? ".pc" : ".bin"), FileMode.Create))) { //Write container int currPos = 0x80; switch (frm.Format) { case -1: return; case 0: { //header br.WritePaddedString("PC", 2); br.Write((short)Textures.Count); //position entries for (int i = 0; i < Textures.Count; i++) { br.Write(currPos); currPos += Textures[i].RawBuffer.Count() + 0x80; } br.Write(currPos); //padding for (int i = Textures.Count; i < 30; i++) { br.Write(0); } break; } } //Write body foreach (var t in Textures) t.Write(br); } } } } } }
27.445652
129
0.549703
[ "Unlicense" ]
HelloOO7/SPICA
SPICA.WinForms/Formats/GFPackedTexture.cs
2,527
C#
using System; using Symbolica.Expression; namespace Symbolica.Computation.Exceptions { [Serializable] public class IrreducibleSymbolicExpressionException : SymbolicaException { public IrreducibleSymbolicExpressionException() : base("The symbolic expression cannot be reduced to a constant.") { } } }
23.6
78
0.700565
[ "MIT" ]
SymbolicaDev/Symbolica
src/Computation/Exceptions/IrreducibleSymbolicExpressionException.cs
356
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Uno.Extensions; using Uno.SourceGeneration; namespace Uno.UI.SourceGenerators.TSBindings { class TSBindingsGenerator : SourceGenerator { private string _bindingsPaths; private string[] _sourceAssemblies; private static INamedTypeSymbol _stringSymbol; private static INamedTypeSymbol _intSymbol; private static INamedTypeSymbol _floatSymbol; private static INamedTypeSymbol _doubleSymbol; private static INamedTypeSymbol _byteSymbol; private static INamedTypeSymbol _shortSymbol; private static INamedTypeSymbol _intPtrSymbol; private static INamedTypeSymbol _boolSymbol; private static INamedTypeSymbol _longSymbol; private static INamedTypeSymbol _structLayoutSymbol; private static INamedTypeSymbol _interopMessageSymbol; public override void Execute(SourceGeneratorContext context) { var project = context.GetProjectInstance(); _bindingsPaths = project.GetPropertyValue("TSBindingsPath")?.ToString(); _sourceAssemblies = project.GetItems("TSBindingAssemblySource").Select(s => s.EvaluatedInclude).ToArray(); if(!string.IsNullOrEmpty(_bindingsPaths)) { _stringSymbol = context.Compilation.GetTypeByMetadataName("System.String"); _intSymbol = context.Compilation.GetTypeByMetadataName("System.Int32"); _floatSymbol = context.Compilation.GetTypeByMetadataName("System.Single"); _doubleSymbol = context.Compilation.GetTypeByMetadataName("System.Double"); _byteSymbol = context.Compilation.GetTypeByMetadataName("System.Byte"); _shortSymbol = context.Compilation.GetTypeByMetadataName("System.Int16"); _intPtrSymbol = context.Compilation.GetTypeByMetadataName("System.IntPtr"); _boolSymbol = context.Compilation.GetTypeByMetadataName("System.Boolean"); _longSymbol = context.Compilation.GetTypeByMetadataName("System.Int64"); _structLayoutSymbol = context.Compilation.GetTypeByMetadataName(typeof(System.Runtime.InteropServices.StructLayoutAttribute).FullName); _interopMessageSymbol = context.Compilation.GetTypeByMetadataName("Uno.Foundation.Interop.TSInteropMessageAttribute"); var modules = from ext in context.Compilation.ExternalReferences let sym = context.Compilation.GetAssemblyOrModuleSymbol(ext) as IAssemblySymbol where _sourceAssemblies.Contains(sym.Name) from module in sym.Modules select module; modules = modules.Concat(context.Compilation.SourceModule); GenerateTSMarshallingLayouts(modules); } } internal void GenerateTSMarshallingLayouts(IEnumerable<IModuleSymbol> modules) { var messageTypes = from module in modules from type in GetNamespaceTypes(module) where ( type.FindAttributeFlattened(_interopMessageSymbol) != null && type.TypeKind == TypeKind.Struct ) select type; messageTypes = messageTypes.ToArray(); foreach (var messageType in messageTypes) { var packValue = GetStructPack(messageType); var sb = new IndentedStringBuilder(); sb.AppendLineInvariant($"/* {nameof(TSBindingsGenerator)} Generated code -- this code is regenerated on each build */"); using (sb.BlockInvariant($"class {messageType.Name}")) { sb.AppendLineInvariant($"/* Pack={packValue} */"); foreach (var field in messageType.GetFields()) { sb.AppendLineInvariant($"{field.Name} : {GetTSFieldType(field.Type)};"); } if (messageType.Name.EndsWith("Params")) { GenerateUmarshaler(messageType, sb, packValue); } if (messageType.Name.EndsWith("Return")) { GenerateMarshaler(messageType, sb, packValue); } } var outputPath = Path.Combine(_bindingsPaths, $"{messageType.Name}.ts"); File.WriteAllText(outputPath, sb.ToString()); } } private static IEnumerable<INamedTypeSymbol> GetNamespaceTypes(IModuleSymbol module) { foreach(var type in module.GlobalNamespace.GetNamespaceTypes()) { yield return type; foreach(var inner in type.GetTypeMembers()) { yield return inner; } } } private int GetStructPack(INamedTypeSymbol parametersType) { // https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/Portable/Symbols/TypeLayout.cs is not available. if (parametersType.GetType().GetProperty("Layout", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) is PropertyInfo info) { if (info.GetValue(parametersType) is object typeLayout) { if (typeLayout.GetType().GetProperty("Kind", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) is PropertyInfo layoutKingProperty) { if (((System.Runtime.InteropServices.LayoutKind)layoutKingProperty.GetValue(typeLayout)) == System.Runtime.InteropServices.LayoutKind.Sequential) { if (typeLayout.GetType().GetProperty("Alignment", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public) is PropertyInfo alignmentProperty) { return (short)alignmentProperty.GetValue(typeLayout); } } else { throw new InvalidOperationException($"The LayoutKind for {parametersType} must be LayoutKind.Sequential"); } } } } throw new InvalidOperationException($"Failed to get structure layout, unknown roslyn internal structure"); } private bool IsMarshalledExplicitly(IFieldSymbol fieldSymbol) { // https://github.com/dotnet/roslyn/blob/0610c79807fa59d0815f2b89e5283cf6d630b71e/src/Compilers/CSharp/Portable/Symbols/Metadata/PE/PEFieldSymbol.cs#L133 is not available. if (fieldSymbol.GetType().GetProperty( "IsMarshalledExplicitly", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) is PropertyInfo info ) { if (info.GetValue(fieldSymbol) is bool isMarshalledExplicitly) { return isMarshalledExplicitly; } } throw new InvalidOperationException($"Failed to IsMarshalledExplicitly, unknown roslyn internal structure"); } private void GenerateMarshaler(INamedTypeSymbol parametersType, IndentedStringBuilder sb, int packValue) { using (sb.BlockInvariant($"public marshal(pData:number)")) { var fieldOffset = 0; foreach (var field in parametersType.GetFields()) { var fieldSize = GetNativeFieldSize(field); bool isStringField = field.Type == _stringSymbol; if (field.Type is IArrayTypeSymbol arraySymbol) { throw new NotSupportedException($"Return value array fields are not supported ({field})"); } else { var value = $"this.{field.Name}"; if (isStringField) { using (sb.BlockInvariant("")) { sb.AppendLineInvariant($"var stringLength = lengthBytesUTF8({value});"); sb.AppendLineInvariant($"var pString = Module._malloc(stringLength + 1);"); sb.AppendLineInvariant($"stringToUTF8({value}, pString, stringLength + 1);"); sb.AppendLineInvariant( $"Module.setValue(pData + {fieldOffset}, pString, \"*\");" ); } } else { sb.AppendLineInvariant( $"Module.setValue(pData + {fieldOffset}, {value}, \"{GetEMField(field.Type)}\");" ); } } fieldOffset += fieldSize; var adjust = fieldOffset % packValue; if (adjust != 0) { fieldOffset += (packValue - adjust); } } } } private void GenerateUmarshaler(INamedTypeSymbol parametersType, IndentedStringBuilder sb, int packValue) { using (sb.BlockInvariant($"public static unmarshal(pData:number) : {parametersType.Name}")) { sb.AppendLineInvariant($"let ret = new {parametersType.Name}();"); var fieldOffset = 0; foreach (var field in parametersType.GetFields()) { var fieldSize = GetNativeFieldSize(field); if (field.Type is IArrayTypeSymbol arraySymbol) { if (!IsMarshalledExplicitly(field)) { // This is required by the mono-wasm AOT engine for fields to be properly considered. throw new InvalidOperationException($"The field {field} is an array but does not have a [MarshalAs(UnmanagedType.LPArray)] attribute"); } var elementType = arraySymbol.ElementType; var elementTSType = GetTSType(elementType); var isElementString = elementType == _stringSymbol; var elementSize = isElementString ? 4 : fieldSize; using (sb.BlockInvariant("")) { sb.AppendLineInvariant($"var pArray = Module.getValue(pData + {fieldOffset}, \"*\");"); using (sb.BlockInvariant("if(pArray !== 0)")) { sb.AppendLineInvariant($"ret.{field.Name} = new Array<{GetTSFieldType(elementType)}>();"); using (sb.BlockInvariant($"for(var i=0; i<ret.{field.Name}_Length; i++)")) { sb.AppendLineInvariant($"var value = Module.getValue(pArray + i * {elementSize}, \"{GetEMField(field.Type)}\");"); if (isElementString) { using (sb.BlockInvariant("if(value !== 0)")) { sb.AppendLineInvariant($"ret.{field.Name}.push({elementTSType}(MonoRuntime.conv_string(value)));"); } sb.AppendLineInvariant("else"); using (sb.BlockInvariant("")) { sb.AppendLineInvariant($"ret.{field.Name}.push(null);"); } } else { sb.AppendLineInvariant($"ret.{field.Name}.push({elementTSType}(value));"); } } } sb.AppendLineInvariant("else"); using (sb.BlockInvariant("")) { sb.AppendLineInvariant($"ret.{field.Name} = null;"); } } } else { using (sb.BlockInvariant("")) { if(field.Type == _stringSymbol) { sb.AppendLineInvariant($"var ptr = Module.getValue(pData + {fieldOffset}, \"{GetEMField(field.Type)}\");"); using (sb.BlockInvariant("if(ptr !== 0)")) { sb.AppendLineInvariant($"ret.{field.Name} = {GetTSType(field.Type)}(Module.UTF8ToString(ptr));"); } sb.AppendLineInvariant("else"); using (sb.BlockInvariant("")) { sb.AppendLineInvariant($"ret.{field.Name} = null;"); } } else { sb.AppendLineInvariant($"ret.{field.Name} = {GetTSType(field.Type)}(Module.getValue(pData + {fieldOffset}, \"{GetEMField(field.Type)}\"));"); } } } fieldOffset += fieldSize; var adjust = fieldOffset % packValue; if (adjust != 0) { fieldOffset += (packValue - adjust); } } sb.AppendLineInvariant($"return ret;"); } } private int GetNativeFieldSize(IFieldSymbol field) { if( field.Type == _stringSymbol || field.Type == _intSymbol || field.Type == _intPtrSymbol || field.Type == _floatSymbol || field.Type == _boolSymbol || field.Type is IArrayTypeSymbol ) { return 4; } else if(field.Type == _doubleSymbol) { return 8; } else { throw new NotSupportedException($"The field [{field} {field.Type}] is not supported"); } } private static string GetEMField(ITypeSymbol fieldType) { if ( fieldType == _stringSymbol || fieldType == _intPtrSymbol || fieldType is IArrayTypeSymbol ) { return "*"; } else if ( fieldType == _intSymbol || fieldType == _boolSymbol ) { return "i32"; } else if (fieldType == _longSymbol) { return "i64"; } else if (fieldType == _shortSymbol) { return "i16"; } else if (fieldType == _byteSymbol) { return "i8"; } else if (fieldType == _floatSymbol) { return "float"; } else if (fieldType == _doubleSymbol) { return "double"; } else { throw new NotSupportedException($"Unsupported EM type conversion [{fieldType}]"); } } private static string GetTSType(ITypeSymbol type) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (type is IArrayTypeSymbol array) { return $"Array<{GetTSType(array.ElementType)}>"; } else if (type == _stringSymbol) { return "String"; } else if ( type == _intSymbol || type == _floatSymbol || type == _doubleSymbol || type == _byteSymbol || type == _shortSymbol || type == _intPtrSymbol ) { return "Number"; } else if (type == _boolSymbol) { return "Boolean"; } else { throw new NotSupportedException($"The type {type} is not supported"); } } private static string GetTSFieldType(ITypeSymbol type) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (type is IArrayTypeSymbol array) { return $"Array<{GetTSFieldType(array.ElementType)}>"; } else if (type == _stringSymbol) { return "string"; } else if ( type == _intSymbol || type == _floatSymbol || type == _doubleSymbol || type == _byteSymbol || type == _shortSymbol || type == _intPtrSymbol ) { return "number"; } else if (type == _boolSymbol) { return "boolean"; } else { throw new NotSupportedException($"The type {type} is not supported"); } } } }
29.242358
174
0.662286
[ "Apache-2.0" ]
06needhamt/uno
src/SourceGenerators/Uno.UI.SourceGenerators/TSBindings/TSBindingsGenerator.cs
13,395
C#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. using System.Linq; using Analyzer.Utilities.PooledObjects; namespace System.Collections.Immutable { internal static class ImmutableHashSetExtensions { public static ImmutableHashSet<T> AddRange<T>(this ImmutableHashSet<T> set1, ImmutableHashSet<T> set2) { using var builder = PooledHashSet<T>.GetInstance(); foreach (var item in set1) { builder.Add(item); } foreach (var item in set2) { builder.Add(item); } if (builder.Count == set1.Count) { return set1; } if (builder.Count == set2.Count) { return set2; } return builder.ToImmutable(); } public static ImmutableHashSet<T> IntersectSet<T>(this ImmutableHashSet<T> set1, ImmutableHashSet<T> set2) { if (set1.IsEmpty || set2.IsEmpty) { return ImmutableHashSet<T>.Empty; } else if (set1.Count == 1) { return set2.Contains(set1.First()) ? set1 : ImmutableHashSet<T>.Empty; } else if (set2.Count == 1) { return set1.Contains(set2.First()) ? set2 : ImmutableHashSet<T>.Empty; } using var builder = PooledHashSet<T>.GetInstance(); foreach (var item in set1) { if (set2.Contains(item)) { builder.Add(item); } } if (builder.Count == set1.Count) { return set1; } else if (builder.Count == set2.Count) { return set2; } return builder.ToImmutable(); } public static bool IsSubsetOfSet<T>(this ImmutableHashSet<T> set1, ImmutableHashSet<T> set2) { if (set1.Count > set2.Count) { return false; } foreach (var item in set1) { if (!set2.Contains(item)) { return false; } } return true; } public static void AddIfNotNull<T>(this ImmutableHashSet<T>.Builder builder, T? item) where T : class { if (item != null) { builder.Add(item); } } } }
26.94
145
0.466964
[ "MIT" ]
AndreasVolkmann/roslyn-analyzers
src/Utilities/Compiler/Extensions/ImmutableHashSetExtensions.cs
2,696
C#
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using static Google.Apis.Bigquery.v2.JobsResource; namespace Google.Cloud.BigQuery.V2 { /// <summary> /// Options for <c>GetJob</c> operations. Currently no options are /// available, but this class exists to provide consistency and extensibility. /// </summary> public sealed class GetJobOptions { internal void ModifyRequest(GetRequest request) { } } }
34.066667
82
0.710372
[ "Apache-2.0" ]
Acidburn0zzz/google-cloud-dotnet
apis/Google.Cloud.BigQuery.V2/Google.Cloud.BigQuery.V2/GetJobOptions.cs
1,024
C#
using Godot; using YUtil.Random; public class DarkRandomizer : WalkingShooter { public override void _Ready() { GDArea.Bullets.RegisterEmitter(this, "DropStuff", (p, i) => { p.Translate(new Vector2(12, 14)); p.VelocityMMF2 = 20 + random.Next(40); p.DirectionMMF2 = 8 + random.Next(1, 5) * (random.NextBoolean() ? 1 : -1); p.GravityMMF2 = 12; }); base._Ready(); } }
26.052632
90
0.511111
[ "MIT" ]
up-left/ykny
knytt/objects/banks/bank17/DarkRandomizer.cs
495
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace marketplaceservice.Helpers { public interface IJwtIdClaimReaderHelper { public Guid getUserIdFromToken(string jwt); } }
19.153846
51
0.759036
[ "MIT" ]
S65-2-project/MarketplaceService
MarketplaceService/Helpers/IJwtIdClaimReaderHelper.cs
251
C#
// <copyright file="ClientPacketHandler.cs" company="MUnique"> // Licensed under the MIT License. See LICENSE file in the project root for full license information. // </copyright> namespace MUnique.OpenMU.ConnectServer.PacketHandler { using System; using System.Collections.Generic; using System.Net.Sockets; using log4net; /// <summary> /// The handler of packets coming from the client. /// </summary> internal class ClientPacketHandler : IPacketHandler<Client> { private static readonly ILog Log = LogManager.GetLogger(typeof(ClientPacketHandler)); private readonly IDictionary<byte, IPacketHandler<Client>> packetHandlers = new Dictionary<byte, IPacketHandler<Client>>(); private readonly Settings settings; /// <summary> /// Initializes a new instance of the <see cref="ClientPacketHandler"/> class. /// </summary> /// <param name="connectServer">The connect server.</param> public ClientPacketHandler(IConnectServer connectServer) { this.settings = connectServer.Settings; this.packetHandlers.Add(0x05, new FtpRequestHandler(connectServer.Settings)); this.packetHandlers.Add(0xF4, new ServerListHandler(connectServer)); } /// <inheritdoc/> public void HandlePacket(Client client, Span<byte> packet) { try { if (packet[1] > this.settings.MaxReceiveSize || packet.Length < 4) { this.DisconnectClientUnknownPacket(client, packet); return; } var packetType = packet[2]; if (this.packetHandlers.TryGetValue(packetType, out IPacketHandler<Client> packetHandler)) { packetHandler.HandlePacket(client, packet); } else if (this.settings.DcOnUnknownPacket) { this.DisconnectClientUnknownPacket(client, packet); } else { // do nothing. } } catch (SocketException ex) { if (Log.IsDebugEnabled) { Log.DebugFormat("SocketException occured in Client.ReceivePacket, Client Address: {0}:{1}, Packet: [{2}], Exception: {3}", client.Address, client.Port, packet.ToArray().ToHexString(), ex); } } catch (Exception ex) { Log.WarnFormat("Exception occured in Client.ReceivePacket, Client Address: {0}:{1}, Packet: [{2}], Exception: {3}", client.Address, client.Port, packet.ToArray().ToHexString(), ex); } } private void DisconnectClientUnknownPacket(Client client, Span<byte> packet) { Log.InfoFormat("Client {0}:{1} will be disconnected because it sent an unknown packet: {2}", client.Address, client.Port, packet.ToArray().ToHexString()); client.Connection.Disconnect(); } } }
38.8875
208
0.582449
[ "MIT" ]
Apollyon221/OpenMU
src/ConnectServer/PacketHandler/ClientPacketHandler.cs
3,113
C#
using System; using NUnit.Framework; using it.unifi.dsi.stlab.networkreasoner.model.gas; using it.unifi.dsi.stlab.networkreasoner.gas.system.exactly_dimensioned_instance; using it.unifi.dsi.stlab.networkreasoner.gas.system.formulae; using log4net; using log4net.Config; using System.IO; using System.Collections.Generic; using it.unifi.dsi.stlab.networkreasoner.gas.system.exactly_dimensioned_instance.listeners; using it.unifi.dsi.stlab.utilities.object_with_substitution; using it.unifi.dsi.stlab.math.algebra; using it.unifi.dsi.stlab.networkreasoner.gas.system.exactly_dimensioned_instance.unknowns_initializations; using it.unifi.dsi.stlab.networkreasoner.model.textualinterface; namespace it.unifi.dsi.stlab.networkreasoner.gas.system.tests { [TestFixture()] public class NetwonRaphsonSystemThreeNodesNetworkLoadNodesWithNegativePressures { GasNetwork aGasNetwork{ get; set; } [SetUp()] public void SetupNetwork () { this.aGasNetwork = new GasNetwork (); GasNodeAbstract nodeAwithSupplyGadget = this.makeNodeA (); GasNodeAbstract nodeBwithLoadGadget = this.makeNodeB (); GasNodeAbstract nodeCwithLoadGadger = this.makeNodeC (); GasEdgeAbstract edgeAB = this.makeEdgeAB ( nodeAwithSupplyGadget, nodeBwithLoadGadget); GasEdgeAbstract edgeCB = this.makeEdgeCB ( nodeCwithLoadGadger, nodeBwithLoadGadget); this.aGasNetwork.Nodes.Add ("nodeA", nodeAwithSupplyGadget); this.aGasNetwork.Nodes.Add ("nodeB", nodeBwithLoadGadget); this.aGasNetwork.Nodes.Add ("nodeC", nodeCwithLoadGadger); this.aGasNetwork.Edges.Add ("edgeAB", edgeAB); this.aGasNetwork.Edges.Add ("edgeCB", edgeCB); } GasNodeAbstract makeNodeA () { GasNodeAbstract supplyNode = new GasNodeTopological{ Comment = "node A with supply gadget", Height = 0, Identifier = "nA" }; GasNodeGadget supplyGadget = new GasNodeGadgetSupply{ MaxQ = 198.3, MinQ = 10.4, SetupPressure = 30 }; return new GasNodeWithGadget{ Equipped = supplyNode, Gadget = supplyGadget }; } GasNodeAbstract makeNodeB () { GasNodeAbstract supplyNode = new GasNodeTopological{ Comment = "node B with load gadget", Height = 0, Identifier = "nB" }; GasNodeGadget gadget = new GasNodeGadgetLoad{ Load = 0.0 }; return new GasNodeWithGadget{ Equipped = supplyNode, Gadget = gadget }; } GasNodeAbstract makeNodeC () { GasNodeAbstract supplyNode = new GasNodeTopological{ Comment = "node C with supply gadget", Height = 0, Identifier = "nC" }; GasNodeGadget gadget = new GasNodeGadgetLoad{ Load = 180.0 }; return new GasNodeWithGadget{ Equipped = supplyNode, Gadget = gadget }; } GasEdgeAbstract makeEdgeAB (GasNodeAbstract aStartNode, GasNodeAbstract anEndNode) { GasEdgeAbstract anEdgeAB = new GasEdgeTopological{ StartNode = aStartNode, EndNode = anEndNode, Identifier = "edgeAB" }; return new GasEdgePhysical{ Described = anEdgeAB, Length = 500, Roughness = 55, Diameter = 100, MaxSpeed = 10 }; } GasEdgeAbstract makeEdgeCB (GasNodeAbstract aStartNode, GasNodeAbstract anEndNode) { GasEdgeAbstract anEdgeCB = new GasEdgeTopological{ StartNode = aStartNode, EndNode = anEndNode, Identifier = "edgeCB" }; return new GasEdgePhysical{ Described = anEdgeCB, Length = 500, Roughness = 55, Diameter = 100, MaxSpeed = 10 }; } public AmbientParameters valid_initial_ambient_parameters () { AmbientParameters parameters = new AmbientParametersGas (); parameters.ElementName = "methane"; parameters.MolWeight = 16.0; parameters.ElementTemperatureInKelvin = 288.15; parameters.RefPressureInBar = 1.01325; parameters.RefTemperatureInKelvin = 288.15; parameters.AirPressureInBar = 1.01325; parameters.AirTemperatureInKelvin = 288.15; parameters.ViscosityInPascalTimesSecond = .0000108; return parameters; } [Test()] public void do_mutation_via_repetition_checking_pressure_correctness_after_main_computation () { RunnableSystem runnableSystem = new RunnableSystemCompute { LogConfigFileInfo = new FileInfo ( "log4net-configurations/for-three-nodes-network.xml"), Precision = 1e-4, UnknownInitialization = new UnknownInitializationSimplyRandomized () }; runnableSystem = new RunnableSystemWithDecorationComputeCompletedHandler{ DecoredRunnableSystem = runnableSystem, OnComputeCompletedHandler = checkAssertions }; runnableSystem.compute ("three network with negative loads system", this.aGasNetwork.Nodes, this.aGasNetwork.Edges, this.valid_initial_ambient_parameters ()); } void checkAssertions (String systemName, FluidDynamicSystemStateAbstract aSystemState) { Assert.That (aSystemState, Is.InstanceOf ( typeof(FluidDynamicSystemStateNegativeLoadsCorrected)) ); OneStepMutationResults results = (aSystemState as FluidDynamicSystemStateNegativeLoadsCorrected). FluidDynamicSystemStateMathematicallySolved.MutationResult; var dimensionalUnknowns = results.makeUnknownsDimensional ().WrappedObject; var nodeA = results.StartingUnsolvedState.findNodeByIdentifier ("nA"); var nodeB = results.StartingUnsolvedState.findNodeByIdentifier ("nB"); var nodeC = results.StartingUnsolvedState.findNodeByIdentifier ("nC"); Assert.That (dimensionalUnknowns.valueAt (nodeA), Is.EqualTo (32.34).Within (1e-5)); Assert.That (dimensionalUnknowns.valueAt (nodeB), Is.EqualTo (32.34).Within (1e-5)); Assert.That (dimensionalUnknowns.valueAt (nodeC), Is.EqualTo (32.34).Within (1e-5)); var edgeAB = results.StartingUnsolvedState.findEdgeByIdentifier ("edgeAB"); var edgeCB = results.StartingUnsolvedState.findEdgeByIdentifier ("edgeCB"); Assert.That (results.Qvector.valueAt (edgeAB), Is.EqualTo (32.34).Within (1e-5)); Assert.That (results.Qvector.valueAt (edgeCB), Is.EqualTo (32.34).Within (1e-5)); } } }
30.335
106
0.732982
[ "MIT" ]
massimo-nocentini/network-reasoner
it.unifi.dsi.stlab.networkreasoner.gas.system.tests/NetwonRaphsonSystemThreeNodesNetworkLoadNodesWithNegativePressures.cs
6,067
C#
using IndieVisible.Infra.CrossCutting.Abstractions; using IndieVisible.Infra.CrossCutting.Notifications.Slack; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RestSharp; using SendGrid; using SendGrid.Helpers.Mail; using System; using System.Net; using System.Threading.Tasks; namespace IndieVisible.Infra.CrossCutting.Notifications { public class SendGridSlackNotificationService : INotificationSender { private readonly IConfiguration configuration; private readonly ILogger logger; public SendGridSlackNotificationService(IConfiguration configuration, ILogger<SendGridSlackNotificationService> logger) { this.configuration = configuration; this.logger = logger; } public async Task SendEmailAsync(string email, string subject, string message) { string apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY"); if (string.IsNullOrEmpty(apiKey)) { apiKey = configuration.GetSection("SENDGRID_APIKEY").Value; } SendGridClient client = new SendGridClient(apiKey); EmailAddress from = new EmailAddress("slavebot@indievisible.net", "INDIEVISIBLE Community"); SendGridMessage msg = new SendGridMessage() { From = from, Subject = subject, PlainTextContent = message, HtmlContent = message }; msg.AddTo(new EmailAddress(email)); await client.SendEmailAsync(msg); } public async Task SendEmailAsync(string email, string templateId, object templateData) { string apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY"); if (string.IsNullOrEmpty(apiKey)) { apiKey = configuration.GetSection("SENDGRID_APIKEY").Value; } SendGridClient client = new SendGridClient(apiKey); EmailAddress from = new EmailAddress("slavebot@indievisible.net", "INDIEVISIBLE Community"); SendGridMessage msg = new SendGridMessage() { From = from, TemplateId = templateId }; msg.SetTemplateData(templateData); msg.AddTo(new EmailAddress(email)); await client.SendEmailAsync(msg); } public Task SendTeamNotificationAsync(string message) { SlackMessage slackMessage = new SlackMessage(message); RestClient client = new RestClient("https://hooks.slack.com/services/TEH1D2GF4/B0123NPCQDD"); RestRequest request = new RestRequest("/M2YMReQBumxAp2DrHhdVDI9p", Method.POST); DefaultContractResolver contractResolver = new DefaultContractResolver { NamingStrategy = new CamelCaseNamingStrategy() }; string jsonToSend = JsonConvert.SerializeObject(slackMessage, new JsonSerializerSettings { ContractResolver = contractResolver, Formatting = Formatting.Indented }); request.AddParameter("application/json; charset=utf-8", jsonToSend, ParameterType.RequestBody); request.RequestFormat = DataFormat.Json; try { client.ExecuteAsync(request, response => { if (response.StatusCode == HttpStatusCode.OK) { logger.LogInformation("Notification sent"); } else { string jsonResponse = JsonConvert.SerializeObject(response); logger.LogWarning(jsonResponse); } }); } catch (Exception ex) { logger.LogError(ex, "Error on sending notification to Slack"); } return Task.CompletedTask; } } }
35.016949
127
0.600678
[ "MIT" ]
programad/indiecativo
IndieVisible.Infra.CrossCutting.Notifications/SendGridSlackNotificationService.cs
4,134
C#
//--------------------------------------------------------------------------- // // Name: Config.cs // Author: Vita Tucek // Created: 11.3.2015 // License: MIT // Description: Save / load program configuration // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Text.RegularExpressions; namespace SerialMonitor { class Config { const string CONFIG_FILE = "serialmonitor.cfg"; const string START_ARGUMENTS = "StartArgs="; const string START_ARGUMENTS_REGEX="(" + START_ARGUMENTS + ")([^\n]*)"; const string HISTORY = "CommandHistory="; const string HISTORY_REGEX="(" + HISTORY + ")([^\n]*)"; #if __MonoCS__ static string filePath = Directory.GetCurrentDirectory() + "/" + CONFIG_FILE; #else static string filePath = Directory.GetCurrentDirectory() + "\\" + CONFIG_FILE; #endif /// <summary> /// Save started parameters /// </summary> /// <param name="args"></param> /// <returns></returns> public static bool SaveStarters(string[] args) { string cfgRecord = START_ARGUMENTS + String.Join(";", args); string cfg = ReadConfigFileAndPrepareSave(START_ARGUMENTS_REGEX, cfgRecord); if(cfg.Length == 0) cfg = cfgRecord; return SaveConfigFile(cfg); } /// <summary> /// Save history /// </summary> /// <param name="args"></param> /// <returns></returns> public static bool SaveHistory(string[] args) { string cfgRecord = HISTORY + String.Join(";", args); string cfg = ReadConfigFileAndPrepareSave(HISTORY, cfgRecord); if(cfg.Length == 0) cfg = cfgRecord; return SaveConfigFile(cfg); } /// <summary> /// Save configuration into file /// </summary> /// <param name="cfg"></param> /// <returns></returns> private static bool SaveConfigFile(string configuration) { try { using(FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write)) { using(StreamWriter sw = new StreamWriter(fs, Encoding.UTF8)) { sw.Write(configuration); sw.Flush(); sw.Close(); } fs.Close(); } } catch(System.IO.IOException ex) { Console.WriteLine("Error (IOException) accessing config file. " + ex.ToString()); return false; } catch(Exception ex) { Console.WriteLine("Error accessing config file. " + ex.ToString()); return false; } return true; } /// <summary> /// Prepare configuration file /// </summary> /// <param name="itemName"></param> /// <param name="newConfigRecord"></param> /// <returns></returns> private static string ReadConfigFileAndPrepareSave(string itemName, string newConfigRecord) { string cfg = ""; if(File.Exists(filePath)) { try { using(FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { if(fs.Length > 0) { using(TextReader sr = new StreamReader(fs, Encoding.UTF8)) { cfg = sr.ReadToEnd(); } Regex rg = new Regex(itemName); if(rg.IsMatch(cfg)) cfg = rg.Replace(cfg, newConfigRecord); else cfg += "\n" + newConfigRecord; } } } catch(FileNotFoundException ex) { } catch(Exception ex) { Console.WriteLine("Error while open config file. " + ex.ToString()); } } return cfg; } /// <summary> /// Load saved start configuration /// </summary> /// <returns></returns> public static string[] LoadStarters() { string[] configArgs = null; string cfg = ReadConfiguration(); if(cfg.Length > 0) { Regex rg = new Regex(START_ARGUMENTS_REGEX); MatchCollection mc = rg.Matches(cfg); if(mc.Count > 0) { string cfgLine = mc[0].Groups[2].Value; return cfgLine.Split(';'); } } return configArgs; } /// <summary> /// Load saved start configuration /// </summary> /// <returns></returns> public static string[] LoadHistory() { string[] history = null; string cfg = ReadConfiguration(); if(cfg.Length > 0) { Regex rg = new Regex(HISTORY_REGEX); MatchCollection mc = rg.Matches(cfg); if(mc.Count > 0) { string cfgLine = mc[0].Groups[2].Value; return cfgLine.Split(';'); } } return history; } private static string ReadConfiguration() { string cfg = ""; if(File.Exists(filePath)) { try { using(FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { if(fs.Length > 0) { using(TextReader sr = new StreamReader(fs, Encoding.UTF8)) { cfg = sr.ReadToEnd(); } } } } catch(FileNotFoundException ex) { return null; } catch(Exception ex) { Console.WriteLine("Error while open config file. " + ex.ToString()); return null; } } return cfg; } } }
26.883117
97
0.47037
[ "MIT" ]
docbender/SerialMonitor
SerialMonitor/Config.cs
6,212
C#
namespace BeUtl.Models; public static class BeUtlDataFormats { public const string Layer = "BeUtlLayerJson"; }
16.714286
49
0.760684
[ "MIT" ]
YiB-PC/BeUtl
src/BeUtl/Models/BeUtlDataFormats.cs
119
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class LangMgr { static LangMgr mgr; string _sLang = "Chinese"; Dictionary<string, string> dic1 = new Dictionary<string, string> (); Dictionary<string, string> dic2 = new Dictionary<string, string> (); public static LangMgr getInstance() { if (mgr == null) mgr = new LangMgr (); return mgr; } public LangMgr() { string[] tSLang = { "Chinese", "SPChinese" }; Dictionary<string, string>[] tDic = { dic1, dic2 }; for (int i = 0; i < tSLang.Length; i++) { var sLang = tSLang [i]; var dic = tDic [i]; TextAsset ta = Resources.Load<TextAsset>("lang/" + sLang); string text = ta.text; string[] lines = text.Split('\n'); foreach (string line in lines) { if (line == null) { continue; } string[] keyAndValue = line.Split('='); dic.Add(keyAndValue[0], keyAndValue[1]); } } } public string getValue(string key) { if (_sLang == "Englise") return key; var dic = _sLang == "Chinese" ? dic1 : dic2; if (dic.ContainsKey(key) == false) { return null; } string value = null; dic.TryGetValue(key, out value); return value; } public void setLang(string sLang){ _sLang = sLang; } }
24.37037
69
0.598024
[ "MIT" ]
Jonle/SolitaireCollection
Assets/Scripts/Mgr/LangMgr.cs
1,318
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the mediastore-2017-09-01.normal.json service model. */ using System; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Amazon.Runtime; using Amazon.MediaStore.Model; namespace Amazon.MediaStore { /// <summary> /// Interface for accessing MediaStore /// /// An AWS Elemental MediaStore container is a namespace that holds folders and objects. /// You use a container endpoint to create, read, and delete objects. /// </summary> public partial interface IAmazonMediaStore : IAmazonService, IDisposable { #if AWS_ASYNC_ENUMERABLES_API /// <summary> /// Paginators for the service /// </summary> IMediaStorePaginatorFactory Paginators { get; } #endif #region CreateContainer /// <summary> /// Creates a storage container to hold objects. A container is similar to a bucket in /// the Amazon S3 service. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateContainer service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateContainer service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.LimitExceededException"> /// A service limit has been exceeded. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer">REST API Reference for CreateContainer Operation</seealso> Task<CreateContainerResponse> CreateContainerAsync(CreateContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteContainer /// <summary> /// Deletes the specified container. Before you make a <code>DeleteContainer</code> request, /// delete any objects in the container or in any folders in the container. You can delete /// only empty containers. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteContainer service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteContainer service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer">REST API Reference for DeleteContainer Operation</seealso> Task<DeleteContainerResponse> DeleteContainerAsync(DeleteContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteContainerPolicy /// <summary> /// Deletes the access policy that is associated with the specified container. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteContainerPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteContainerPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy">REST API Reference for DeleteContainerPolicy Operation</seealso> Task<DeleteContainerPolicyResponse> DeleteContainerPolicyAsync(DeleteContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteCorsPolicy /// <summary> /// Deletes the cross-origin resource sharing (CORS) configuration information that is /// set for the container. /// /// /// <para> /// To use this operation, you must have permission to perform the <code>MediaStore:DeleteCorsPolicy</code> /// action. The container owner has this permission by default and can grant this permission /// to others. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteCorsPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteCorsPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.CorsPolicyNotFoundException"> /// The CORS policy that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy">REST API Reference for DeleteCorsPolicy Operation</seealso> Task<DeleteCorsPolicyResponse> DeleteCorsPolicyAsync(DeleteCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteLifecyclePolicy /// <summary> /// Removes an object lifecycle policy from a container. It takes up to 20 minutes for /// the change to take effect. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteLifecyclePolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteLifecyclePolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy">REST API Reference for DeleteLifecyclePolicy Operation</seealso> Task<DeleteLifecyclePolicyResponse> DeleteLifecyclePolicyAsync(DeleteLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DeleteMetricPolicy /// <summary> /// Deletes the metric policy that is associated with the specified container. If there /// is no metric policy associated with the container, MediaStore doesn't send metrics /// to CloudWatch. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteMetricPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DeleteMetricPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteMetricPolicy">REST API Reference for DeleteMetricPolicy Operation</seealso> Task<DeleteMetricPolicyResponse> DeleteMetricPolicyAsync(DeleteMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region DescribeContainer /// <summary> /// Retrieves the properties of the requested container. This request is commonly used /// to retrieve the endpoint of a container. An endpoint is a value assigned by the service /// when a new container is created. A container's endpoint does not change after it has /// been assigned. The <code>DescribeContainer</code> request returns a single <code>Container</code> /// object based on <code>ContainerName</code>. To return all <code>Container</code> objects /// that are associated with a specified AWS account, use <a>ListContainers</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeContainer service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeContainer service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer">REST API Reference for DescribeContainer Operation</seealso> Task<DescribeContainerResponse> DescribeContainerAsync(DescribeContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetContainerPolicy /// <summary> /// Retrieves the access policy for the specified container. For information about the /// data that is included in an access policy, see the <a href="https://aws.amazon.com/documentation/iam/">AWS /// Identity and Access Management User Guide</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetContainerPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetContainerPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy">REST API Reference for GetContainerPolicy Operation</seealso> Task<GetContainerPolicyResponse> GetContainerPolicyAsync(GetContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetCorsPolicy /// <summary> /// Returns the cross-origin resource sharing (CORS) configuration information that is /// set for the container. /// /// /// <para> /// To use this operation, you must have permission to perform the <code>MediaStore:GetCorsPolicy</code> /// action. By default, the container owner has this permission and can grant it to others. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetCorsPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetCorsPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.CorsPolicyNotFoundException"> /// The CORS policy that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy">REST API Reference for GetCorsPolicy Operation</seealso> Task<GetCorsPolicyResponse> GetCorsPolicyAsync(GetCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetLifecyclePolicy /// <summary> /// Retrieves the object lifecycle policy that is assigned to a container. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetLifecyclePolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetLifecyclePolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy">REST API Reference for GetLifecyclePolicy Operation</seealso> Task<GetLifecyclePolicyResponse> GetLifecyclePolicyAsync(GetLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region GetMetricPolicy /// <summary> /// Returns the metric policy for the specified container. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetMetricPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetMetricPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.MediaStore.Model.PolicyNotFoundException"> /// The policy that you specified in the request does not exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetMetricPolicy">REST API Reference for GetMetricPolicy Operation</seealso> Task<GetMetricPolicyResponse> GetMetricPolicyAsync(GetMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListContainers /// <summary> /// Lists the properties of all containers in AWS Elemental MediaStore. /// /// /// <para> /// You can query to receive all the containers in one response. Or you can include the /// <code>MaxResults</code> parameter to receive a limited number of containers in each /// response. In this case, the response includes a token. To get the next set of containers, /// send the command again, this time with the <code>NextToken</code> parameter (with /// the returned token as its value). The next set of responses appears, with a token /// if there are still more containers to receive. /// </para> /// /// <para> /// See also <a>DescribeContainer</a>, which gets the properties of one container. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListContainers service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListContainers service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers">REST API Reference for ListContainers Operation</seealso> Task<ListContainersResponse> ListContainersAsync(ListContainersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region ListTagsForResource /// <summary> /// Returns a list of the tags assigned to the specified container. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTagsForResource service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListTagsForResource service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso> Task<ListTagsForResourceResponse> ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutContainerPolicy /// <summary> /// Creates an access policy for the specified container to restrict the users and clients /// that can access it. For information about the data that is included in an access policy, /// see the <a href="https://aws.amazon.com/documentation/iam/">AWS Identity and Access /// Management User Guide</a>. /// /// /// <para> /// For this release of the REST API, you can create only one policy for a container. /// If you enter <code>PutContainerPolicy</code> twice, the second command modifies the /// existing policy. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutContainerPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the PutContainerPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy">REST API Reference for PutContainerPolicy Operation</seealso> Task<PutContainerPolicyResponse> PutContainerPolicyAsync(PutContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutCorsPolicy /// <summary> /// Sets the cross-origin resource sharing (CORS) configuration on a container so that /// the container can service cross-origin requests. For example, you might want to enable /// a request whose origin is http://www.example.com to access your AWS Elemental MediaStore /// container at my.example.container.com by using the browser's XMLHttpRequest capability. /// /// /// <para> /// To enable CORS on a container, you attach a CORS policy to the container. In the CORS /// policy, you configure rules that identify origins and the HTTP methods that can be /// executed on your container. The policy can contain up to 398,000 characters. You can /// add up to 100 rules to a CORS policy. If more than one rule applies, the service uses /// the first applicable rule listed. /// </para> /// /// <para> /// To learn more about CORS, see <a href="https://docs.aws.amazon.com/mediastore/latest/ug/cors-policy.html">Cross-Origin /// Resource Sharing (CORS) in AWS Elemental MediaStore</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutCorsPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the PutCorsPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy">REST API Reference for PutCorsPolicy Operation</seealso> Task<PutCorsPolicyResponse> PutCorsPolicyAsync(PutCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutLifecyclePolicy /// <summary> /// Writes an object lifecycle policy to a container. If the container already has an /// object lifecycle policy, the service replaces the existing policy with the new policy. /// It takes up to 20 minutes for the change to take effect. /// /// /// <para> /// For information about how to construct an object lifecycle policy, see <a href="https://docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-components.html">Components /// of an Object Lifecycle Policy</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutLifecyclePolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the PutLifecyclePolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy">REST API Reference for PutLifecyclePolicy Operation</seealso> Task<PutLifecyclePolicyResponse> PutLifecyclePolicyAsync(PutLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region PutMetricPolicy /// <summary> /// The metric policy that you want to add to the container. A metric policy allows AWS /// Elemental MediaStore to send metrics to Amazon CloudWatch. It takes up to 20 minutes /// for the new policy to take effect. /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutMetricPolicy service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the PutMetricPolicy service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutMetricPolicy">REST API Reference for PutMetricPolicy Operation</seealso> Task<PutMetricPolicyResponse> PutMetricPolicyAsync(PutMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StartAccessLogging /// <summary> /// Starts access logging on the specified container. When you enable access logging on /// a container, MediaStore delivers access logs for objects stored in that container /// to Amazon CloudWatch Logs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartAccessLogging service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StartAccessLogging service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StartAccessLogging">REST API Reference for StartAccessLogging Operation</seealso> Task<StartAccessLoggingResponse> StartAccessLoggingAsync(StartAccessLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region StopAccessLogging /// <summary> /// Stops access logging on the specified container. When you stop access logging on a /// container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access /// logs are not saved and are not retrievable. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StopAccessLogging service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the StopAccessLogging service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StopAccessLogging">REST API Reference for StopAccessLogging Operation</seealso> Task<StopAccessLoggingResponse> StopAccessLoggingAsync(StopAccessLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region TagResource /// <summary> /// Adds tags to the specified AWS Elemental MediaStore container. Tags are key:value /// pairs that you can associate with AWS resources. For example, the tag key might be /// "customer" and the tag value might be "companyA." You can specify one or more tags /// to add to each container. You can add up to 50 tags to each container. For more information /// about tagging, including naming and usage conventions, see <a href="https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html">Tagging /// Resources in MediaStore</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the TagResource service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the TagResource service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/TagResource">REST API Reference for TagResource Operation</seealso> Task<TagResourceResponse> TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region UntagResource /// <summary> /// Removes tags from the specified container. You can specify one or more tags to remove. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UntagResource service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UntagResource service method, as returned by MediaStore.</returns> /// <exception cref="Amazon.MediaStore.Model.ContainerInUseException"> /// The container that you specified in the request already exists or is being updated. /// </exception> /// <exception cref="Amazon.MediaStore.Model.ContainerNotFoundException"> /// The container that you specified in the request does not exist. /// </exception> /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException"> /// The service is temporarily unavailable. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/UntagResource">REST API Reference for UntagResource Operation</seealso> Task<UntagResourceResponse> UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion } }
55.712692
194
0.672758
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/MediaStore/Generated/_netstandard/IAmazonMediaStore.cs
39,946
C#
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; namespace ButtonScaler.WinPhone { public partial class MainPage : global::Xamarin.Forms.Platform.WinPhone.FormsApplicationPage { public MainPage() { InitializeComponent(); SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape; global::Xamarin.Forms.Forms.Init(); LoadApplication(new ButtonScaler.App()); } } }
25.76
96
0.71118
[ "Apache-2.0" ]
NoleHealth/xamarin-forms-book-preview-2
Chapter21/ButtonScaler/ButtonScaler/ButtonScaler.WinPhone/MainPage.xaml.cs
646
C#
namespace Domain { public class UserFavorite { public int AdvertiseId { get; set; } public Advertise Advertise { get; set; } public string AppUserId { get; set; } public AppUser AppUser { get; set; } } }
19.307692
48
0.585657
[ "MIT" ]
ebradim/OlxClone_dotNET5_Angular11
Domain/UserFavorite.cs
253
C#
using System.Collections.Generic; namespace StuffPacker { public enum WeightPrefix { none = 0, Gram, Ounce, Pound } public static class WeightPrefixHelper { public static List<string> GetWeightPrefix() { return new List<string> { WeightPrefix.Gram.ToString(), WeightPrefix.Pound.ToString(), WeightPrefix.Ounce.ToString() }; } } }
19.115385
52
0.513078
[ "MIT" ]
StuffPacker/StuffPacker
src/Shared/Shared.Contract/WeightPrefix.cs
499
C#
using System.Text.Json; using RTGS.DotNetSDK.Subscriber.Handlers; using RTGS.Public.Messages.Subscriber; using RTGS.Public.Payment.V3; namespace RTGS.DotNetSDK.Subscriber.Adapters; internal class PayawayCompleteV1MessageAdapter : IMessageAdapter<PayawayCompleteV1> { public string MessageIdentifier => nameof(PayawayCompleteV1); public async Task HandleMessageAsync(RtgsMessage rtgsMessage, IHandler<PayawayCompleteV1> handler) { var payawayCompleteMessage = JsonSerializer.Deserialize<PayawayCompleteV1>(rtgsMessage.Data); await handler.HandleMessageAsync(payawayCompleteMessage); } }
33.222222
99
0.837793
[ "MIT" ]
RTGS-OpenSource/rtgs-dotnet-sdk
src/RTGS.DotNetSDK/RTGS.DotNetSDK/Subscriber/Adapters/PayawayCompleteV1MessageAdapter.cs
600
C#
using AutoMapper; using MediatR; using Microsoft.Extensions.Logging; using Ordering.Application.Contracts.Persistence; using Ordering.Domain.Entities; using System; using System.Threading; using System.Threading.Tasks; using Ordering.Application.Exceptions; namespace Ordering.Application.Features.Orders.Commands.DeleteOrder { public class DeleteOrderCommandHandler : IRequestHandler<DeleteOrderCommand> { private readonly IOrderRepository _orderRepository; private readonly IMapper _mapper; private readonly ILogger<DeleteOrderCommandHandler> _logger; public DeleteOrderCommandHandler(IOrderRepository orderRepository, IMapper mapper, ILogger<DeleteOrderCommandHandler> logger) { _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } public async Task<Unit> Handle(DeleteOrderCommand request, CancellationToken cancellationToken) { var orderToDelete = await _orderRepository.GetByIdAsync(request.Id); if (orderToDelete == null) { // _logger.LogError("Order not exist on database"); throw new NotFoundException(nameof(Order), request.Id); } await _orderRepository.DeleteAsync(orderToDelete); _logger.LogInformation($"Order {orderToDelete.Id} is successfully deleted."); return Unit.Value; } } }
39.682927
133
0.704978
[ "MIT" ]
emanuellopes/dotnetMicroservices
src/Services/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs
1,627
C#
using Shouldly; using StructureMap.Graph; using StructureMap.Pipeline; using Xunit; namespace StructureMap.Testing.Bugs { public class Bug_255_InstanceAttribute_Implementation { [Fact] public void smart_instance_respects_the_name_of_the_inner() { new SmartInstance<ClassWithInstanceAttributes>().Name.ShouldBe("SteveBono"); } [Fact] public void attribute_should_alter_the_concrete_instance_in_explicit_config() { new SmartInstance<ClassWithInstanceAttributes>().Name.ShouldBe("SteveBono"); var container = new Container(x => { x.For<IBase>().Use<ClassWithInstanceAttributes>(); }); container.GetInstance<IBase>("SteveBono").ShouldNotBeNull(); container.Model.Find<IBase>("SteveBono").ShouldNotBeNull(); } [Fact] public void attribute_should_alter_the_concrete_instance_in_scanning() { var container = new Container(x => { x.Scan(_ => { _.TheCallingAssembly(); _.AddAllTypesOf<IBase>(); }); }); container.GetInstance<IBase>("SteveBono").ShouldNotBeNull(); container.Model.Find<IBase>("SteveBono").ShouldNotBeNull(); } } public class PluggableAttribute : StructureMapAttribute { public string ConcreteKey { get; set; } public PluggableAttribute(string concreteKey) { ConcreteKey = concreteKey; } public override void Alter(IConfiguredInstance instance) { instance.Name = ConcreteKey; } } public interface IBase { } [Pluggable("SteveBono")] public class ClassWithInstanceAttributes : IBase { } }
27.681159
104
0.580105
[ "Apache-2.0" ]
CurufinweU/structuremap
src/StructureMap.Testing/Bugs/Bug_255_InstanceAttribute_Implementation.cs
1,912
C#
using Sitecore.Remote.Installation.Client.Responses; using Sitecore.Remote.Installation.Models; namespace Sitecore.Remote.Installation.Pipelines { /// <summary> /// Installation conflict details /// </summary> public class InstallationConflictDetails { /// <summary> /// Initializes a new instance of the <see cref="InstallationConflictDetails"/> class. /// </summary> /// <param name="client">The client.</param> /// <param name="commandsResponse">The commands response.</param> public InstallationConflictDetails(IHttpClient client, CommandsResponse commandsResponse) { this.Client = client; this.CommandsResponse = commandsResponse; } /// <summary> /// Gets the client. /// </summary> /// <value> /// The client. /// </value> public IHttpClient Client { get; private set; } /// <summary> /// Gets or sets the commands response. /// </summary> /// <value> /// The commands response. /// </value> public CommandsResponse CommandsResponse { get; private set; } /// <summary> /// Gets or sets the result. /// </summary> /// <value> /// The result. /// </value> public string Result { get; set; } /// <summary> /// Gets or sets the remote pipeline identifier. /// </summary> /// <value> /// The remote pipeline identifier. /// </value> public string RemotePipelineId { get; set; } } }
26.490909
93
0.61908
[ "MIT" ]
zigor/sinst
sinst/Pipelines/50-InstallationConflicts/InstallationConflictDetails.cs
1,459
C#
#if UNITY_EDITOR using System.Collections; using ModestTree; using UnityEngine.TestTools; using Zenject.Tests.Bindings.FromPrefabResource; namespace Zenject.Tests.Bindings { public class TestFromPrefabResource : ZenjectIntegrationTestFixture { const string PathPrefix = "TestFromPrefabResource/"; [UnityTest] public IEnumerator TestTransientError() { PreInstall(); // Validation should detect that it doesn't exist Container.Bind<Foo>().FromComponentInNewPrefabResource(PathPrefix + "asdfasdfas").AsTransient().NonLazy(); Assert.Throws(() => PostInstall()); yield break; } [UnityTest] public IEnumerator TestTransient() { PreInstall(); Container.Bind<Foo>().FromComponentInNewPrefabResource(PathPrefix + "Foo").AsTransient().NonLazy(); Container.Bind<Foo>().FromComponentInNewPrefabResource(PathPrefix + "Foo").AsTransient().NonLazy(); PostInstall(); FixtureUtil.AssertComponentCount<Foo>(2); yield break; } [UnityTest] public IEnumerator TestSingle() { PreInstall(); Container.Bind(typeof(Foo), typeof(IFoo)).To<Foo>().FromComponentInNewPrefabResource(PathPrefix + "Foo").AsSingle().NonLazy(); PostInstall(); FixtureUtil.AssertComponentCount<Foo>(1); yield break; } [UnityTest] public IEnumerator TestCached1() { PreInstall(); Container.Bind(typeof(Foo), typeof(Bar)).FromComponentInNewPrefabResource(PathPrefix + "Foo") .WithGameObjectName("Foo").AsSingle().NonLazy(); PostInstall(); FixtureUtil.AssertNumGameObjects(1); FixtureUtil.AssertComponentCount<Foo>(1); FixtureUtil.AssertComponentCount<Bar>(1); FixtureUtil.AssertNumGameObjectsWithName("Foo", 1); yield break; } [UnityTest] public IEnumerator TestWithArgumentsFail() { PreInstall(); // They have required arguments Container.Bind(typeof(Gorp), typeof(Qux)).FromComponentInNewPrefabResource(PathPrefix + "GorpAndQux").AsSingle().NonLazy(); Assert.Throws(() => PostInstall()); yield break; } [UnityTest] public IEnumerator TestWithArguments() { PreInstall(); Container.Bind(typeof(Gorp)) .FromComponentInNewPrefabResource(PathPrefix + "Gorp").WithGameObjectName("Gorp").AsSingle() .WithArguments("test1").NonLazy(); PostInstall(); FixtureUtil.AssertNumGameObjects(1); FixtureUtil.AssertComponentCount<Gorp>(1); FixtureUtil.AssertNumGameObjectsWithName("Gorp", 1); yield break; } [UnityTest] public IEnumerator TestWithAbstractSearchSingleMatch() { PreInstall(); // There are three components that implement INorf on this prefab Container.Bind<INorf>().FromComponentInNewPrefabResource(PathPrefix + "Norf").AsCached().NonLazy(); PostInstall(); FixtureUtil.AssertNumGameObjects(1); FixtureUtil.AssertComponentCount<INorf>(3); FixtureUtil.AssertResolveCount<INorf>(Container, 1); yield break; } [UnityTest] public IEnumerator TestWithAbstractSearchMultipleMatch() { PreInstall(); // There are three components that implement INorf on this prefab Container.Bind<INorf>().FromComponentsInNewPrefabResource(PathPrefix + "Norf").AsCached().NonLazy(); PostInstall(); FixtureUtil.AssertNumGameObjects(1); FixtureUtil.AssertComponentCount<INorf>(3); FixtureUtil.AssertResolveCount<INorf>(Container, 3); yield break; } [UnityTest] public IEnumerator TestAbstractBindingConcreteSearch() { PreInstall(); // Should ignore the Norf2 component on it Container.Bind<INorf>().To<Norf>().FromComponentsInNewPrefabResource(PathPrefix + "Norf").AsCached().NonLazy(); PostInstall(); FixtureUtil.AssertNumGameObjects(1); FixtureUtil.AssertResolveCount<INorf>(Container, 2); yield break; } [UnityTest] public IEnumerator TestMultipleMatchFailure() { PreInstall(); Container.Bind<INorf>().FromComponentsInNewPrefabResource(PathPrefix + "Foo").AsSingle().NonLazy(); Assert.Throws(() => PostInstall()); yield break; } [UnityTest] public IEnumerator TestCircularDependencies() { PreInstall(); // Jim and Bob both depend on each other Container.Bind(typeof(Jim), typeof(Bob)).FromComponentInNewPrefabResource(PathPrefix + "JimAndBob").AsSingle().NonLazy(); Container.BindInterfacesTo<JimAndBobRunner>().AsSingle().NonLazy(); PostInstall(); yield break; } public class JimAndBobRunner : IInitializable { readonly Bob _bob; readonly Jim _jim; public JimAndBobRunner(Jim jim, Bob bob) { _bob = bob; _jim = jim; } public void Initialize() { Assert.IsNotNull(_jim.Bob); Assert.IsNotNull(_bob.Jim); Log.Info("Jim and bob successfully got the other reference"); } } } } #endif
31.791209
138
0.588144
[ "MIT" ]
NRatel/Zenject
UnityProject/Assets/Plugins/Zenject/OptionalExtras/IntegrationTests/Tests/Bindings/TestFromPrefabResource/TestFromPrefabResource.cs
5,788
C#
using System.Collections.Generic; using Essensoft.AspNetCore.Payment.Alipay.Response; namespace Essensoft.AspNetCore.Payment.Alipay.Request { /// <summary> /// alipay.ebpp.pdeduct.async.pay /// </summary> public class AlipayEbppPdeductAsyncPayRequest : IAlipayRequest<AlipayEbppPdeductAsyncPayResponse> { /// <summary> /// 公共事业缴费直连代扣异步扣款支付接口 /// </summary> public string BizContent { get; set; } #region IAlipayRequest Members private bool needEncrypt = false; private string apiVersion = "1.0"; private string terminalType; private string terminalInfo; private string prodCode; private string notifyUrl; private string returnUrl; private AlipayObject bizModel; public void SetNeedEncrypt(bool needEncrypt) { this.needEncrypt = needEncrypt; } public bool GetNeedEncrypt() { return needEncrypt; } public void SetNotifyUrl(string notifyUrl) { this.notifyUrl = notifyUrl; } public string GetNotifyUrl() { return notifyUrl; } public void SetReturnUrl(string returnUrl) { this.returnUrl = returnUrl; } public string GetReturnUrl() { return returnUrl; } public void SetTerminalType(string terminalType) { this.terminalType = terminalType; } public string GetTerminalType() { return terminalType; } public void SetTerminalInfo(string terminalInfo) { this.terminalInfo = terminalInfo; } public string GetTerminalInfo() { return terminalInfo; } public void SetProdCode(string prodCode) { this.prodCode = prodCode; } public string GetProdCode() { return prodCode; } public string GetApiName() { return "alipay.ebpp.pdeduct.async.pay"; } public void SetApiVersion(string apiVersion) { this.apiVersion = apiVersion; } public string GetApiVersion() { return apiVersion; } public IDictionary<string, string> GetParameters() { var parameters = new AlipayDictionary { { "biz_content", BizContent } }; return parameters; } public AlipayObject GetBizModel() { return bizModel; } public void SetBizModel(AlipayObject bizModel) { this.bizModel = bizModel; } #endregion } }
22.853659
101
0.547492
[ "MIT" ]
LuohuaRain/payment
src/Essensoft.AspNetCore.Payment.Alipay/Request/AlipayEbppPdeductAsyncPayRequest.cs
2,849
C#
using System; namespace Entitas.CodeGenerator { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] public class CustomPrefixAttribute : Attribute { public readonly string prefix; public CustomPrefixAttribute(string prefix) { this.prefix = prefix; } } }
24.846154
73
0.687307
[ "MIT" ]
cedricdg/Roslyn-CSharp-Code-Generator
Fixtures/Entitas CodeGenerator/Attributes/CustomPrefixAttribute.cs
325
C#
using Microsoft.EntityFrameworkCore; namespace ArrearsRules.V1.Infrastructure { public class DatabaseContext : DbContext { //TODO: rename DatabaseContext to reflect the data source it is representing. eg. MosaicContext. //Guidance on the context class can be found here https://github.com/LBHackney-IT/lbh-lbh-arrears-rules/wiki/DatabaseContext public DatabaseContext(DbContextOptions options) : base(options) { } public DbSet<DatabaseEntity> DatabaseEntities { get; set; } } }
31.823529
132
0.713494
[ "MIT" ]
LBHackney-IT/lbh-arrears-rules
ArrearsRules/V1/Infrastructure/DatabaseContext.cs
541
C#