예제 #1
0
        /// <summary>Snippet for MethodLroResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodLroResourceSignatureAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            string firstName  = "items/[ITEM_ID]";
            string secondName = "items/[ITEM_ID]";
            string thirdName  = "items/[ITEM_ID]";
            // Make the request
            Operation <LroResponse, LroMetadata> response = await snippetsClient.MethodLroResourceSignatureAsync(firstName, secondName, thirdName);

            // Poll until the returned long-running operation is complete
            Operation <LroResponse, LroMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            LroResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <LroResponse, LroMetadata> retrievedResponse = await snippetsClient.PollOnceMethodLroResourceSignatureAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                LroResponse retrievedResult = retrievedResponse.Result;
            }
        }
        /// <summary>Snippet for MethodLroSignaturesAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodLroSignaturesAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            string aString = "";
            int    anInt   = 0;
            bool   aBool   = false;
            // Make the request
            Operation <LroResponse, LroMetadata> response = await snippetsClient.MethodLroSignaturesAsync(aString, anInt, aBool);

            // Poll until the returned long-running operation is complete
            Operation <LroResponse, LroMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            LroResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <LroResponse, LroMetadata> retrievedResponse = await snippetsClient.PollOnceMethodLroSignaturesAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                LroResponse retrievedResult = retrievedResponse.Result;
            }
        }
        /// <summary>Snippet for MethodThreeSignaturesAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodThreeSignatures3Async()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Make the request
            Response response = await snippetsClient.MethodThreeSignaturesAsync();
        }
예제 #4
0
        /// <summary>Snippet for MethodResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodResourceSignature2Async()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            string firstName = "items/[ITEM_ID]";
            // Make the request
            Response response = await snippetsClient.MethodResourceSignatureAsync(firstName);
        }
        /// <summary>Snippet for MethodRepeatedResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodRepeatedResourceSignatureAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            IEnumerable <string> names = new string[] { "items/[ITEM_ID]", };
            // Make the request
            Response response = await snippetsClient.MethodRepeatedResourceSignatureAsync(names);
        }
        /// <summary>Snippet for MethodResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodResourceSignature2ResourceNamesAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            SimpleResourceName firstName = SimpleResourceName.FromItem("[ITEM_ID]");
            // Make the request
            Response response = await snippetsClient.MethodResourceSignatureAsync(firstName);
        }
        /// <summary>Snippet for TaskMethodAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task TaskMethodRequestObjectAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            ts::Task request = new ts::Task {
            };
            // Make the request
            ts::Task response = await snippetsClient.TaskMethodAsync(request);
        }
예제 #8
0
        /// <summary>Snippet for MethodThreeSignaturesAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodThreeSignatures2Async()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            string aString = "";
            bool   aBool   = false;
            // Make the request
            Response response = await snippetsClient.MethodThreeSignaturesAsync(aString, aBool);
        }
예제 #9
0
        /// <summary>Snippet for MethodMapSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodMapSignatureAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            IDictionary <int, string> mapIntString = new Dictionary <int, string> {
                { 0, "" },
            };
            // Make the request
            Response response = await snippetsClient.MethodMapSignatureAsync(mapIntString);
        }
        /// <summary>Snippet for MethodRepeatedResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodRepeatedResourceSignatureResourceNamesAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            IEnumerable <SimpleResourceName> names = new SimpleResourceName[]
            {
                SimpleResourceName.FromItem("[ITEM_ID]"),
            };
            // Make the request
            Response response = await snippetsClient.MethodRepeatedResourceSignatureAsync(names);
        }
예제 #11
0
        /// <summary>Snippet for OneOfMethodAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task OneOfMethodRequestObjectAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            OneOfRequest request = new OneOfRequest
            {
                NonOneOfString = "",
                AString        = "",
            };
            // Make the request
            Response response = await snippetsClient.OneOfMethodAsync(request);
        }
        /// <summary>Snippet for MethodResourceSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodResourceSignatureRequestObjectAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            ResourceSignatureRequest request = new ResourceSignatureRequest
            {
                FirstNameAsSimpleResourceName  = SimpleResourceName.FromItem("[ITEM_ID]"),
                SecondNameAsSimpleResourceName = SimpleResourceName.FromItem("[ITEM_ID]"),
                ThirdNameAsSimpleResourceName  = SimpleResourceName.FromItem("[ITEM_ID]"),
            };
            // Make the request
            Response response = await snippetsClient.MethodResourceSignatureAsync(request);
        }
예제 #13
0
        /// <summary>Snippet for MethodMapSignatureAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodMapSignatureRequestObjectAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            SignatureRequest request = new SignatureRequest
            {
                AString      = "",
                AnInt        = 0,
                ABool        = false,
                MapIntString = { { 0, "" }, },
            };
            // Make the request
            Response response = await snippetsClient.MethodMapSignatureAsync(request);
        }
예제 #14
0
        /// <summary>Snippet for MethodDefaultValuesAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodDefaultValuesResourceNamesAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            IEnumerable <double> repeatedDouble = new double[] { 0, };
            IEnumerable <DefaultValuesRequest.Types.NestedMessage> repeatedNestedMessage = new DefaultValuesRequest.Types.NestedMessage[]
            {
                new DefaultValuesRequest.Types.NestedMessage(),
            };
            IEnumerable <AResourceName> repeatedResourceName = new AResourceName[]
            {
                AResourceName.FromItemPart("[ITEM_ID]", "[PART_ID]"),
            };
            // Make the request
            Response response = await snippetsClient.MethodDefaultValuesAsync(repeatedDouble, repeatedNestedMessage, repeatedResourceName);
        }
예제 #15
0
        /// <summary>Snippet for MethodDefaultValuesAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MethodDefaultValuesRequestObjectAsync()
        {
            // Create client
            SnippetsClient snippetsClient = await SnippetsClient.CreateAsync();

            // Initialize request argument(s)
            DefaultValuesRequest request = new DefaultValuesRequest
            {
                SingleDouble        = 0,
                SingleFloat         = 0F,
                SingleInt32         = 0,
                SingleInt64         = 0L,
                SingleUint32        = 0U,
                SingleUint64        = 0UL,
                SingleSint32        = 0,
                SingleSint64        = 0L,
                SingleFixed32       = 0U,
                SingleFixed64       = 0UL,
                SingleSfixed32      = 0,
                SingleSfixed64      = 0L,
                SingleBool          = false,
                SingleString        = "",
                SingleBytes         = ByteString.Empty,
                SingleMessage       = new AnotherMessage(),
                SingleNestedMessage = new DefaultValuesRequest.Types.NestedMessage(),
                SingleEnum          = Enum.Default,
                SingleNestedEnum    = DefaultValuesRequest.Types.NestedEnum.DefaultValue,
                RepeatedDouble      = { 0, },
                RepeatedFloat       = { 0F, },
                RepeatedInt32       = { 0, },
                RepeatedInt64       = { 0L, },
                RepeatedUint32      = { 0U, },
                RepeatedUint64      = { 0UL, },
                RepeatedSint32      = { 0, },
                RepeatedSint64      = { 0L, },
                RepeatedFixed32     = { 0U, },
                RepeatedFixed64     = { 0UL, },
                RepeatedSfixed32    = { 0, },
                RepeatedSfixed64    = { 0L, },
                RepeatedBool        = { false, },
                RepeatedString      = { "", },
                RepeatedBytes       = { ByteString.Empty, },
                RepeatedMessage     =
                {
                    new AnotherMessage(),
                },
                RepeatedNestedMessage =
                {
                    new DefaultValuesRequest.Types.NestedMessage(),
                },
                RepeatedEnum       = { Enum.Default, },
                RepeatedNestedEnum =
                {
                    DefaultValuesRequest.Types.NestedEnum.DefaultValue,
                },
                SingleResourceNameAsAResourceName    = AResourceName.FromItemPart("[ITEM_ID]", "[PART_ID]"),
                RepeatedResourceNameAsAResourceNames =
                {
                    AResourceName.FromItemPart("[ITEM_ID]", "[PART_ID]"),
                },
                SingleWildcardResourceAsResourceName    = new UnparsedResourceName("a/wildcard/resource"),
                RepeatedWildcardResourceAsResourceNames =
                {
                    new UnparsedResourceName("a/wildcard/resource"),
                },
                MultiPatternResourceNameAsMultiPatternResourceName          = MultiPatternResourceName.FromRootAItem("[ROOT_A_ID]", "[ITEM_ID]"),
                RepeatedMultiPatternResourceNameAsMultiPatternResourceNames =
                {
                    MultiPatternResourceName.FromRootAItem("[ROOT_A_ID]", "[ITEM_ID]"),
                },
                MapIntString          = { { 0, "" }, },
                SingleWrappedDouble   = 0,
                SingleWrappedFloat    = 0F,
                SingleWrappedInt64    = 0L,
                SingleWrappedUint64   = 0UL,
                SingleWrappedInt32    = 0,
                SingleWrappedUint32   = 0U,
                SingleWrappedBool     = false,
                SingleWrappedString   = "",
                SingleWrappedBytes    = ByteString.Empty,
                RepeatedWrappedDouble = { 0, },
                RepeatedWrappedFloat  = { 0F, },
                RepeatedWrappedInt64  = { 0L, },
                RepeatedWrappedUint64 = { 0UL, },
                RepeatedWrappedInt32  = { 0, },
                RepeatedWrappedUint32 = { 0U, },
                RepeatedWrappedBool   = { false, },
                RepeatedWrappedString = { "", },
                RepeatedWrappedBytes  = { ByteString.Empty, },
            };
            // Make the request
            Response response = await snippetsClient.MethodDefaultValuesAsync(request);
        }