/// <summary>Snippet for MethodDefaultValues</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MethodDefaultValues()
 {
     // Create client
     SnippetsClient snippetsClient = SnippetsClient.Create();
     // Initialize request argument(s)
     IEnumerable <double> repeatedDouble = new double[] { 0, };
     IEnumerable <DefaultValuesRequest.Types.NestedMessage> repeatedNestedMessage = new DefaultValuesRequest.Types.NestedMessage[]
     {
         new DefaultValuesRequest.Types.NestedMessage(),
     };
     IEnumerable <string> repeatedResourceName = new string[]
     {
         "items/[ITEM_ID]/parts/[PART_ID]",
     };
     // Make the request
     Response response = snippetsClient.MethodDefaultValues(repeatedDouble, repeatedNestedMessage, repeatedResourceName);
 }
 /// <summary>Snippet for MethodDefaultValues</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MethodDefaultValuesResourceNames()
 {
     // Create client
     SnippetsClient snippetsClient = SnippetsClient.Create();
     // 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 = snippetsClient.MethodDefaultValues(repeatedDouble, repeatedNestedMessage, repeatedResourceName);
 }
Exemplo n.º 3
0
 /// <summary>Snippet for MethodDefaultValues</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MethodDefaultValuesRequestObject()
 {
     // Create client
     SnippetsClient snippetsClient = SnippetsClient.Create();
     // 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 = snippetsClient.MethodDefaultValues(request);
 }