diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyOptions.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyOptions.cs
deleted file mode 100644
index 6ca4bfda6..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyOptions.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Iam.V1
-{
- /// Delete a specific Key.
- public class DeleteApiKeyOptions : IOptions
- {
-
- /// The Twilio-provided string that uniquely identifies the Key resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteKeyOptions
- /// The Twilio-provided string that uniquely identifies the Key resource to delete.
- public DeleteApiKeyOptions(string pathSid)
- {
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// Fetch a specific Key.
- public class FetchApiKeyOptions : IOptions
- {
-
- /// The Twilio-provided string that uniquely identifies the Key resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchKeyOptions
- /// The Twilio-provided string that uniquely identifies the Key resource to fetch.
- public FetchApiKeyOptions(string pathSid)
- {
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// Update a specific Key.
- public class UpdateApiKeyOptions : IOptions
- {
-
- /// The Twilio-provided string that uniquely identifies the Key resource to update.
- public string PathSid { get; }
-
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- public string FriendlyName { get; set; }
-
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- public object Policy { get; set; }
-
-
-
- /// Construct a new UpdateKeyOptions
- /// The Twilio-provided string that uniquely identifies the Key resource to update.
- public UpdateApiKeyOptions(string pathSid)
- {
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (FriendlyName != null)
- {
- p.Add(new KeyValuePair("FriendlyName", FriendlyName));
- }
- if (Policy != null)
- {
- p.Add(new KeyValuePair("Policy", Serializers.JsonObject(Policy)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyResource.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyResource.cs
deleted file mode 100644
index 1228a7d42..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyResource.cs
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Iam.V1
-{
- public class ApiKeyResource : Resource
- {
-
-
-
-
-
- /// Delete a specific Key.
- /// Delete ApiKey parameters
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- private static Request BuildDeleteRequest(DeleteApiKeyOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Keys/{Sid}";
-
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Iam,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Delete a specific Key.
- /// Delete ApiKey parameters
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static bool Delete(DeleteApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// Delete a specific Key.
- /// Delete ApiKey parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteApiKeyOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// Delete a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static bool Delete(string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteApiKeyOptions(pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// Delete a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- public static async System.Threading.Tasks.Task DeleteAsync(string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteApiKeyOptions(pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchApiKeyOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Keys/{Sid}";
-
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Iam,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Fetch a specific Key.
- /// Fetch ApiKey parameters
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static ApiKeyResource Fetch(FetchApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Fetch a specific Key.
- /// Fetch ApiKey parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- public static async System.Threading.Tasks.Task FetchAsync(FetchApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Fetch a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static ApiKeyResource Fetch(
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchApiKeyOptions(pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Fetch a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- public static async System.Threading.Tasks.Task FetchAsync(string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchApiKeyOptions(pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateApiKeyOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Keys/{Sid}";
-
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Iam,
- path,
- contentType: EnumConstants.ContentTypeEnum.FORM_URLENCODED,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Update a specific Key.
- /// Update ApiKey parameters
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static ApiKeyResource Update(UpdateApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// Update a specific Key.
- /// Update ApiKey parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateApiKeyOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// Update a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to update.
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- /// Client to make requests to Twilio
- /// A single instance of ApiKey
- public static ApiKeyResource Update(
- string pathSid,
- string friendlyName = null,
- object policy = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateApiKeyOptions(pathSid){ FriendlyName = friendlyName, Policy = policy };
- return Update(options, client);
- }
-
- #if !NET35
- /// Update a specific Key.
- /// The Twilio-provided string that uniquely identifies the Key resource to update.
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ApiKey
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathSid,
- string friendlyName = null,
- object policy = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateApiKeyOptions(pathSid){ FriendlyName = friendlyName, Policy = policy };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a ApiKeyResource object
- ///
- /// Raw JSON string
- /// ApiKeyResource object represented by the provided JSON
- public static ApiKeyResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique string that we created to identify the Key resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The string that you assigned to describe the resource.
- [JsonProperty("friendly_name")]
- public string FriendlyName { get; private set; }
-
- /// The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- [JsonProperty("policy")]
- public object Policy { get; private set; }
-
-
-
- private ApiKeyResource() {
-
- }
- }
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysOptions.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysOptions.cs
deleted file mode 100644
index 5f0f52dfc..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysOptions.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Iam.V1
-{
- /// Retrieve a list of all Keys for a account.
- public class ReadGetApiKeysOptions : ReadOptions
- {
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- public string AccountSid { get; }
-
-
-
- /// Construct a new ListGetKeysOptions
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- public ReadGetApiKeysOptions(string accountSid)
- {
- AccountSid = accountSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (AccountSid != null)
- {
- p.Add(new KeyValuePair("AccountSid", AccountSid));
- }
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysResource.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysResource.cs
deleted file mode 100644
index dbaaf156a..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/GetApiKeysResource.cs
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Iam.V1
-{
- public class GetApiKeysResource : Resource
- {
-
-
-
-
-
- private static Request BuildReadRequest(ReadGetApiKeysOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Keys";
-
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Iam,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// Retrieve a list of all Keys for a account.
- /// Read GetApiKeys parameters
- /// Client to make requests to Twilio
- /// A single instance of GetApiKeys
- public static ResourceSet Read(ReadGetApiKeysOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("keys", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// Retrieve a list of all Keys for a account.
- /// Read GetApiKeys parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of GetApiKeys
- public static async System.Threading.Tasks.Task> ReadAsync(ReadGetApiKeysOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("keys", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// Retrieve a list of all Keys for a account.
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of GetApiKeys
- public static ResourceSet Read(
- string accountSid,
- long? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadGetApiKeysOptions(accountSid){ PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// Retrieve a list of all Keys for a account.
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of GetApiKeys
- public static async System.Threading.Tasks.Task> ReadAsync(
- string accountSid,
- long? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadGetApiKeysOptions(accountSid){ PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("keys", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("keys", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("keys", response.Content);
- }
-
-
- ///
- /// Converts a JSON string into a GetApiKeysResource object
- ///
- /// Raw JSON string
- /// GetApiKeysResource object represented by the provided JSON
- public static GetApiKeysResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique string that we created to identify the Key resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The string that you assigned to describe the resource.
- [JsonProperty("friendly_name")]
- public string FriendlyName { get; private set; }
-
- /// The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
-
-
- private GetApiKeysResource() {
-
- }
- }
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.cs
deleted file mode 100644
index ce96de3bf..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Iam.V1
-{
-
- /// Create a new Signing Key for the account making the request.
- public class CreateNewApiKeyOptions : IOptions
- {
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- public string AccountSid { get; }
-
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- public string FriendlyName { get; set; }
-
-
- public NewApiKeyResource.KeytypeEnum KeyType { get; set; }
-
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- public object Policy { get; set; }
-
-
- /// Construct a new CreateNewKeyOptions
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- public CreateNewApiKeyOptions(string accountSid)
- {
- AccountSid = accountSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (AccountSid != null)
- {
- p.Add(new KeyValuePair("AccountSid", AccountSid));
- }
- if (FriendlyName != null)
- {
- p.Add(new KeyValuePair("FriendlyName", FriendlyName));
- }
- if (KeyType != null)
- {
- p.Add(new KeyValuePair("KeyType", KeyType.ToString()));
- }
- if (Policy != null)
- {
- p.Add(new KeyValuePair("Policy", Serializers.JsonObject(Policy)));
- }
- return p;
- }
-
-
-
- }
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyResource.cs b/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyResource.cs
deleted file mode 100644
index a420cb2ed..000000000
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/NewApiKeyResource.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-using Twilio.Types;
-
-
-namespace Twilio.Rest.Iam.V1
-{
- public class NewApiKeyResource : Resource
- {
-
-
-
- public sealed class KeytypeEnum : StringEnum
- {
- private KeytypeEnum(string value) : base(value) {}
- public KeytypeEnum() {}
- public static implicit operator KeytypeEnum(string value)
- {
- return new KeytypeEnum(value);
- }
- public static readonly KeytypeEnum Restricted = new KeytypeEnum("restricted");
-
- }
-
-
- private static Request BuildCreateRequest(CreateNewApiKeyOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Keys";
-
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Iam,
- path,
- contentType: EnumConstants.ContentTypeEnum.FORM_URLENCODED,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Create a new Signing Key for the account making the request.
- /// Create NewApiKey parameters
- /// Client to make requests to Twilio
- /// A single instance of NewApiKey
- public static NewApiKeyResource Create(CreateNewApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Create a new Signing Key for the account making the request.
- /// Create NewApiKey parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of NewApiKey
- public static async System.Threading.Tasks.Task CreateAsync(CreateNewApiKeyOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// Create a new Signing Key for the account making the request.
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- ///
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- /// Client to make requests to Twilio
- /// A single instance of NewApiKey
- public static NewApiKeyResource Create(
- string accountSid,
- string friendlyName = null,
- NewApiKeyResource.KeytypeEnum keyType = null,
- object policy = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateNewApiKeyOptions(accountSid){ FriendlyName = friendlyName, KeyType = keyType, Policy = policy };
- return Create(options, client);
- }
-
- #if !NET35
- /// Create a new Signing Key for the account making the request.
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- /// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- ///
- /// The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of NewApiKey
- public static async System.Threading.Tasks.Task CreateAsync(
- string accountSid,
- string friendlyName = null,
- NewApiKeyResource.KeytypeEnum keyType = null,
- object policy = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateNewApiKeyOptions(accountSid){ FriendlyName = friendlyName, KeyType = keyType, Policy = policy };
- return await CreateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a NewApiKeyResource object
- ///
- /// Raw JSON string
- /// NewApiKeyResource object represented by the provided JSON
- public static NewApiKeyResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The string that you assigned to describe the resource.
- [JsonProperty("friendly_name")]
- public string FriendlyName { get; private set; }
-
- /// The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
- [JsonProperty("secret")]
- public string Secret { get; private set; }
-
- /// Collection of allow assertions.
- [JsonProperty("policy")]
- public object Policy { get; private set; }
-
-
-
- private NewApiKeyResource() {
-
- }
- }
-}
-
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/TokenOptions.cs b/examples/csharp/src/Twilio/Rest/Oauth/V2/TokenOptions.cs
similarity index 81%
rename from examples/csharp/src/Twilio/Rest/Iam/V1/TokenOptions.cs
rename to examples/csharp/src/Twilio/Rest/Oauth/V2/TokenOptions.cs
index a0eabf328..b393b4186 100644
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/TokenOptions.cs
+++ b/examples/csharp/src/Twilio/Rest/Oauth/V2/TokenOptions.cs
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -21,7 +21,7 @@
-namespace Twilio.Rest.Iam.V1
+namespace Twilio.Rest.Oauth.V2
{
/// create
@@ -29,10 +29,10 @@ public class CreateTokenOptions : IOptions
{
/// Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
- public string GrantType { get; }
+ public string GrantType { get; set; }
/// A 34 character string that uniquely identifies this OAuth App.
- public string ClientId { get; }
+ public string ClientId { get; set; }
/// The credential for confidential OAuth App.
public string ClientSecret { get; set; }
@@ -53,14 +53,6 @@ public class CreateTokenOptions : IOptions
public string Scope { get; set; }
- /// Construct a new CreateTokenOptions
- /// Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
- /// A 34 character string that uniquely identifies this OAuth App.
- public CreateTokenOptions(string grantType, string clientId)
- {
- GrantType = grantType;
- ClientId = clientId;
- }
/// Generate the necessary parameters
diff --git a/examples/csharp/src/Twilio/Rest/Iam/V1/TokenResource.cs b/examples/csharp/src/Twilio/Rest/Oauth/V2/TokenResource.cs
similarity index 90%
rename from examples/csharp/src/Twilio/Rest/Iam/V1/TokenResource.cs
rename to examples/csharp/src/Twilio/Rest/Oauth/V2/TokenResource.cs
index a26d69f53..bdfe34d63 100644
--- a/examples/csharp/src/Twilio/Rest/Iam/V1/TokenResource.cs
+++ b/examples/csharp/src/Twilio/Rest/Oauth/V2/TokenResource.cs
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -25,7 +25,7 @@
-namespace Twilio.Rest.Iam.V1
+namespace Twilio.Rest.Oauth.V2
{
public class TokenResource : Resource
{
@@ -37,12 +37,12 @@ public class TokenResource : Resource
private static Request BuildCreateRequest(CreateTokenOptions options, ITwilioRestClient client)
{
- string path = "/v1/token";
+ string path = "/v2/token";
return new Request(
HttpMethod.Post,
- Rest.Domain.Iam,
+ Rest.Domain.Oauth,
path,
contentType: EnumConstants.ContentTypeEnum.FORM_URLENCODED,
postParams: options.GetParams(),
@@ -86,8 +86,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Creat
/// Client to make requests to Twilio
/// A single instance of Token
public static TokenResource Create(
- string grantType,
- string clientId,
+ string grantType = null,
+ string clientId = null,
string clientSecret = null,
string code = null,
string redirectUri = null,
@@ -96,7 +96,7 @@ public static TokenResource Create(
string scope = null,
ITwilioRestClient client = null)
{
- var options = new CreateTokenOptions(grantType, clientId){ ClientSecret = clientSecret, Code = code, RedirectUri = redirectUri, Audience = audience, RefreshToken = refreshToken, Scope = scope };
+ var options = new CreateTokenOptions(){ GrantType = grantType, ClientId = clientId, ClientSecret = clientSecret, Code = code, RedirectUri = redirectUri, Audience = audience, RefreshToken = refreshToken, Scope = scope };
return Create(options, client);
}
@@ -113,8 +113,8 @@ public static TokenResource Create(
/// Client to make requests to Twilio
/// Task that resolves to A single instance of Token
public static async System.Threading.Tasks.Task CreateAsync(
- string grantType,
- string clientId,
+ string grantType = null,
+ string clientId = null,
string clientSecret = null,
string code = null,
string redirectUri = null,
@@ -123,7 +123,7 @@ public static async System.Threading.Tasks.Task CreateAsync(
string scope = null,
ITwilioRestClient client = null)
{
- var options = new CreateTokenOptions(grantType, clientId){ ClientSecret = clientSecret, Code = code, RedirectUri = redirectUri, Audience = audience, RefreshToken = refreshToken, Scope = scope };
+ var options = new CreateTokenOptions(){ GrantType = grantType, ClientId = clientId, ClientSecret = clientSecret, Code = code, RedirectUri = redirectUri, Audience = audience, RefreshToken = refreshToken, Scope = scope };
return await CreateAsync(options, client);
}
#endif
diff --git a/examples/go/go-client/go.mod b/examples/go/go-client/go.mod
index acecc3755..9ed0ef7cc 100644
--- a/examples/go/go-client/go.mod
+++ b/examples/go/go-client/go.mod
@@ -1,6 +1,6 @@
module go-client
-go 1.20
+go 1.21
require (
github.com/golang/mock v1.6.0
diff --git a/examples/go/go-client/go.sum b/examples/go/go-client/go.sum
deleted file mode 100644
index 6630d08aa..000000000
--- a/examples/go/go-client/go.sum
+++ /dev/null
@@ -1,650 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.61.0/go.mod h1:XukKJg4Y7QsUu0Hxg3qQKUWR4VuWivmyMK2+rUyxAqw=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
-github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
-github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
-github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
-github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
-github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
-github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
-github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
-github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
-github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE=
-github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
-github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
-github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I=
-github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
-github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
-github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
-github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
-github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
-github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
-github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
-github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
-github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
-github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
-github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
-github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
-github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
-github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
-github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
-github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
-github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0=
-github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
-github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
-github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
-github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
-github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
-github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
-github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
-github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
-github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
-github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637 h1:Ud/6/AdmJ1R7ibdS0Wo5MWPj0T1R0fkpaD087bBaW8I=
-github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
-github.com/hashicorp/go-getter v1.5.3/go.mod h1:BrrV/1clo8cCYu6mxvboYg+KutTiFnXjMEgDD8+i7ZI=
-github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
-github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
-github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
-github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
-github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
-github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
-github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0=
-github.com/hashicorp/go-plugin v1.4.1/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
-github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
-github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
-github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4=
-github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/hc-install v0.3.1/go.mod h1:3LCdWcCDS1gaHC9mhHCGbkYfoY6vdsKohGjugbZdZak=
-github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8=
-github.com/hashicorp/hcl/v2 v2.11.1 h1:yTyWcXcm9XB0TEkyU/JCRU6rYy4K+mgLtzn2wlrJbcc=
-github.com/hashicorp/hcl/v2 v2.11.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/terraform-exec v0.15.0/go.mod h1:H4IG8ZxanU+NW0ZpDRNsvh9f0ul7C0nHP+rUR/CHs7I=
-github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk=
-github.com/hashicorp/terraform-plugin-go v0.5.0/go.mod h1:PAVN26PNGpkkmsvva1qfriae5Arky3xl3NfzKa8XFVM=
-github.com/hashicorp/terraform-plugin-go v0.7.1 h1:sZxEVwqkGxoYFu+vs9NI3qR1s0JGjG5DwV/n8PehIPQ=
-github.com/hashicorp/terraform-plugin-go v0.7.1/go.mod h1:gP1vMbBqUmOWdZKJzNSAVr2G5G5pkCIK0Uoih0tqcbw=
-github.com/hashicorp/terraform-plugin-log v0.2.0/go.mod h1:E1kJmapEHzqu1x6M++gjvhzM2yMQNXPVWZRCB8sgYjg=
-github.com/hashicorp/terraform-plugin-log v0.2.1/go.mod h1:RW/n0x4dyITmenuirZ1ViPQGP5JQdPTZ4Wwc0rLKi94=
-github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1 h1:B9AocC+dxrCqcf4vVhztIkSkt3gpRjUkEka8AmZWGlQ=
-github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1/go.mod h1:FjM9DXWfP0w/AeOtJoSKHBZ01LqmaO6uP4bXhv3fekw=
-github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896/go.mod h1:bzBPnUIkI0RxauU8Dqo+2KrZZ28Cf48s8V6IHt3p4co=
-github.com/hashicorp/terraform-registry-address v0.0.0-20210816115301-cb2034eba045/go.mod h1:anRyJbe12BZscpFgaeGu9gH12qfdBP094LYFtuAFzd4=
-github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
-github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
-github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
-github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
-github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
-github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
-github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74=
-github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4=
-github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
-github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
-github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
-github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
-github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4=
-github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
-github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
-github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
-github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
-github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
-github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
-github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
-github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
-github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
-github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758=
-github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs=
-github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
-github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
-github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
-github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/twilio/terraform-provider-twilio v0.13.1 h1:k15MNgq1Z5Y5oMC1vEAoyDnEjrSkGTXLw1IwFShjdvM=
-github.com/twilio/terraform-provider-twilio v0.13.1/go.mod h1:SrIOuaRtGTrAAUC3xmi7oJ7bGcEZKauMou1QXhrazh8=
-github.com/twilio/twilio-go v0.22.1/go.mod h1:mZF1yc+wuuotZAJ2gHB2vcIKotxa0VXyfqUZN9Em5G8=
-github.com/twilio/twilio-go v0.25.0 h1:Vk3OjsIcm//WTpywp3y+HD+Goiyf1SIiLQR+sxw+/gM=
-github.com/twilio/twilio-go v0.25.0/go.mod h1:lz62Hopu4vicpQ056H5TJ0JE4AP0rS3sQ35/ejmgOwE=
-github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
-github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
-github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
-github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
-github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U=
-github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
-github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
-github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc=
-github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
-github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
-github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
-github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
-github.com/zclconf/go-cty v1.9.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
-github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0=
-github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
-github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
-golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
-golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
-golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
-golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
-golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
-google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
-google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/examples/go/go-client/helper/rest/iam/v1/README.md b/examples/go/go-client/helper/rest/iam/v1/README.md
deleted file mode 100644
index 38e283acf..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# Go API client for openapi
-
-This is the public Twilio REST API.
-
-## Overview
-This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
-
-- API version: 1.0.0
-- Package version: 1.0.0
-- Build package: com.twilio.oai.TwilioGoGenerator
-For more information, please visit [https://support.twilio.com](https://support.twilio.com)
-
-## Installation
-
-Install the following dependencies:
-
-```shell
-go get github.com/stretchr/testify/assert
-go get golang.org/x/net/context
-```
-
-Put the package under your project folder and add the following in import:
-
-```golang
-import "./openapi"
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to *https://iam.twilio.com*
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*KeysApi* | [**CreateNewKey**](docs/KeysApi.md#createnewkey) | **Post** /v1/Keys |
-*KeysApi* | [**DeleteKey**](docs/KeysApi.md#deletekey) | **Delete** /v1/Keys/{Sid} |
-*KeysApi* | [**FetchKey**](docs/KeysApi.md#fetchkey) | **Get** /v1/Keys/{Sid} |
-*KeysApi* | [**ListGetKeys**](docs/KeysApi.md#listgetkeys) | **Get** /v1/Keys |
-*KeysApi* | [**UpdateKey**](docs/KeysApi.md#updatekey) | **Post** /v1/Keys/{Sid} |
-*TokenApi* | [**CreateToken**](docs/TokenApi.md#createtoken) | **Post** /v1/token | Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant
-
-
-## Documentation For Models
-
- - [IamV1AccountSearchRoleResponse](docs/IamV1AccountSearchRoleResponse.md)
- - [IamV1AccountSearchRequest](docs/IamV1AccountSearchRequest.md)
- - [TwilioServiceErrorResponse](docs/TwilioServiceErrorResponse.md)
- - [IamV1NewKey](docs/IamV1NewKey.md)
- - [IamV1Key](docs/IamV1Key.md)
- - [IamV1AccountSearchListMeta](docs/IamV1AccountSearchListMeta.md)
- - [IamV1AccountStatsResponse](docs/IamV1AccountStatsResponse.md)
- - [OauthV1Token](docs/OauthV1Token.md)
- - [IamV1GetKeys](docs/IamV1GetKeys.md)
- - [ListGetKeysResponse](docs/ListGetKeysResponse.md)
- - [ListGetKeysResponseMeta](docs/ListGetKeysResponseMeta.md)
- - [IamV1AccountSearchAccount](docs/IamV1AccountSearchAccount.md)
-
-
-## Documentation For Authorization
-
-
-
-## accountSid_authToken
-
-- **Type**: HTTP basic authentication
-
-Example
-
-```golang
-auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
- UserName: "username",
- Password: "password",
-})
-r, err := client.Service.Operation(auth, args)
-```
-
diff --git a/examples/go/go-client/helper/rest/iam/v1/keys.go b/examples/go/go-client/helper/rest/iam/v1/keys.go
deleted file mode 100644
index 4f3293f36..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/keys.go
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-import (
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/twilio/twilio-go/client"
-)
-
-// Optional parameters for the method 'CreateNewKey'
-type CreateNewKeyParams struct {
- // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- AccountSid *string `json:"AccountSid,omitempty"`
- // A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- FriendlyName *string `json:"FriendlyName,omitempty"`
- //
- KeyType *string `json:"KeyType,omitempty"`
- // The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- Policy *interface{} `json:"Policy,omitempty"`
-}
-
-func (params *CreateNewKeyParams) SetAccountSid(AccountSid string) *CreateNewKeyParams {
- params.AccountSid = &AccountSid
- return params
-}
-func (params *CreateNewKeyParams) SetFriendlyName(FriendlyName string) *CreateNewKeyParams {
- params.FriendlyName = &FriendlyName
- return params
-}
-func (params *CreateNewKeyParams) SetKeyType(KeyType string) *CreateNewKeyParams {
- params.KeyType = &KeyType
- return params
-}
-func (params *CreateNewKeyParams) SetPolicy(Policy interface{}) *CreateNewKeyParams {
- params.Policy = &Policy
- return params
-}
-
-// Create a new Signing Key for the account making the request.
-func (c *ApiService) CreateNewKey(params *CreateNewKeyParams) (*IamV1NewKey, error) {
- path := "/v1/Keys"
-
- data := url.Values{}
- headers := map[string]interface{}{
- "Content-Type": "application/x-www-form-urlencoded",
- }
-
- if params != nil && params.AccountSid != nil {
- data.Set("AccountSid", *params.AccountSid)
- }
- if params != nil && params.FriendlyName != nil {
- data.Set("FriendlyName", *params.FriendlyName)
- }
- if params != nil && params.KeyType != nil {
- data.Set("KeyType", *params.KeyType)
- }
- if params != nil && params.Policy != nil {
- v, err := json.Marshal(params.Policy)
-
- if err != nil {
- return nil, err
- }
-
- data.Set("Policy", string(v))
- }
-
- resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
- if err != nil {
- return nil, err
- }
-
- defer resp.Body.Close()
-
- ps := &IamV1NewKey{}
- if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
- return nil, err
- }
-
- return ps, err
-}
-
-// Delete a specific Key.
-func (c *ApiService) DeleteKey(Sid string) error {
- path := "/v1/Keys/{Sid}"
- path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
-
- data := url.Values{}
- headers := map[string]interface{}{
- "Content-Type": "application/x-www-form-urlencoded",
- }
-
- resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
- if err != nil {
- return err
- }
-
- defer resp.Body.Close()
-
- return nil
-}
-
-// Fetch a specific Key.
-func (c *ApiService) FetchKey(Sid string) (*IamV1Key, error) {
- path := "/v1/Keys/{Sid}"
- path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
-
- data := url.Values{}
- headers := map[string]interface{}{
- "Content-Type": "application/x-www-form-urlencoded",
- }
-
- resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
- if err != nil {
- return nil, err
- }
-
- defer resp.Body.Close()
-
- ps := &IamV1Key{}
- if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
- return nil, err
- }
-
- return ps, err
-}
-
-// Optional parameters for the method 'ListGetKeys'
-type ListGetKeysParams struct {
- // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- AccountSid *string `json:"AccountSid,omitempty"`
- // How many resources to return in each list page. The default is 50, and the maximum is 1000.
- PageSize *int `json:"PageSize,omitempty"`
- // Max number of records to return.
- Limit *int `json:"limit,omitempty"`
-}
-
-func (params *ListGetKeysParams) SetAccountSid(AccountSid string) *ListGetKeysParams {
- params.AccountSid = &AccountSid
- return params
-}
-func (params *ListGetKeysParams) SetPageSize(PageSize int) *ListGetKeysParams {
- params.PageSize = &PageSize
- return params
-}
-func (params *ListGetKeysParams) SetLimit(Limit int) *ListGetKeysParams {
- params.Limit = &Limit
- return params
-}
-
-// Retrieve a single page of GetKeys records from the API. Request is executed immediately.
-func (c *ApiService) PageGetKeys(params *ListGetKeysParams, pageToken, pageNumber string) (*ListGetKeysResponse, error) {
- path := "/v1/Keys"
-
- data := url.Values{}
- headers := map[string]interface{}{
- "Content-Type": "application/x-www-form-urlencoded",
- }
-
- if params != nil && params.AccountSid != nil {
- data.Set("AccountSid", *params.AccountSid)
- }
- if params != nil && params.PageSize != nil {
- data.Set("PageSize", fmt.Sprint(*params.PageSize))
- }
-
- if pageToken != "" {
- data.Set("PageToken", pageToken)
- }
- if pageNumber != "" {
- data.Set("Page", pageNumber)
- }
-
- resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
- if err != nil {
- return nil, err
- }
-
- defer resp.Body.Close()
-
- ps := &ListGetKeysResponse{}
- if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
- return nil, err
- }
-
- return ps, err
-}
-
-// Lists GetKeys records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
-func (c *ApiService) ListGetKeys(params *ListGetKeysParams) ([]IamV1GetKeys, error) {
- response, errors := c.StreamGetKeys(params)
-
- records := make([]IamV1GetKeys, 0)
- for record := range response {
- records = append(records, record)
- }
-
- if err := <-errors; err != nil {
- return nil, err
- }
-
- return records, nil
-}
-
-// Streams GetKeys records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
-func (c *ApiService) StreamGetKeys(params *ListGetKeysParams) (chan IamV1GetKeys, chan error) {
- if params == nil {
- params = &ListGetKeysParams{}
- }
- params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
-
- recordChannel := make(chan IamV1GetKeys, 1)
- errorChannel := make(chan error, 1)
-
- response, err := c.PageGetKeys(params, "", "")
- if err != nil {
- errorChannel <- err
- close(recordChannel)
- close(errorChannel)
- } else {
- go c.streamGetKeys(response, params, recordChannel, errorChannel)
- }
-
- return recordChannel, errorChannel
-}
-
-func (c *ApiService) streamGetKeys(response *ListGetKeysResponse, params *ListGetKeysParams, recordChannel chan IamV1GetKeys, errorChannel chan error) {
- curRecord := 1
-
- for response != nil {
- responseRecords := response.Keys
- for item := range responseRecords {
- recordChannel <- responseRecords[item]
- curRecord += 1
- if params.Limit != nil && *params.Limit < curRecord {
- close(recordChannel)
- close(errorChannel)
- return
- }
- }
-
- record, err := client.GetNext(c.baseURL, response, c.getNextListGetKeysResponse)
- if err != nil {
- errorChannel <- err
- break
- } else if record == nil {
- break
- }
-
- response = record.(*ListGetKeysResponse)
- }
-
- close(recordChannel)
- close(errorChannel)
-}
-
-func (c *ApiService) getNextListGetKeysResponse(nextPageUrl string) (interface{}, error) {
- if nextPageUrl == "" {
- return nil, nil
- }
- resp, err := c.requestHandler.Get(nextPageUrl, nil, nil)
- if err != nil {
- return nil, err
- }
-
- defer resp.Body.Close()
-
- ps := &ListGetKeysResponse{}
- if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
- return nil, err
- }
- return ps, nil
-}
-
-// Optional parameters for the method 'UpdateKey'
-type UpdateKeyParams struct {
- // A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- FriendlyName *string `json:"FriendlyName,omitempty"`
- // The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- Policy *interface{} `json:"Policy,omitempty"`
-}
-
-func (params *UpdateKeyParams) SetFriendlyName(FriendlyName string) *UpdateKeyParams {
- params.FriendlyName = &FriendlyName
- return params
-}
-func (params *UpdateKeyParams) SetPolicy(Policy interface{}) *UpdateKeyParams {
- params.Policy = &Policy
- return params
-}
-
-// Update a specific Key.
-func (c *ApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*IamV1Key, error) {
- path := "/v1/Keys/{Sid}"
- path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
-
- data := url.Values{}
- headers := map[string]interface{}{
- "Content-Type": "application/x-www-form-urlencoded",
- }
-
- if params != nil && params.FriendlyName != nil {
- data.Set("FriendlyName", *params.FriendlyName)
- }
- if params != nil && params.Policy != nil {
- v, err := json.Marshal(params.Policy)
-
- if err != nil {
- return nil, err
- }
-
- data.Set("Policy", string(v))
- }
-
- resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
- if err != nil {
- return nil, err
- }
-
- defer resp.Body.Close()
-
- ps := &IamV1Key{}
- if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
- return nil, err
- }
-
- return ps, err
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_account.go b/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_account.go
deleted file mode 100644
index d9675cafb..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_account.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// IamV1AccountSearchAccount struct for IamV1AccountSearchAccount
-type IamV1AccountSearchAccount struct {
- AccountSid *string `json:"accountSid,omitempty"`
- AccountPath *string `json:"accountPath,omitempty"`
- Status int `json:"status,omitempty"`
- Dormant *bool `json:"dormant,omitempty"`
- Trial *bool `json:"trial,omitempty"`
- MemberPlatform *string `json:"memberPlatform,omitempty"`
- FriendlyName *string `json:"friendlyName,omitempty"`
- Subaccount *bool `json:"subaccount,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_list_meta.go b/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_list_meta.go
deleted file mode 100644
index 5307d29aa..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_list_meta.go
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// IamV1AccountSearchListMeta struct for IamV1AccountSearchListMeta
-type IamV1AccountSearchListMeta struct {
- PreviousToken *string `json:"previousToken,omitempty"`
- NextToken *string `json:"nextToken,omitempty"`
- PageSize int `json:"pageSize,omitempty"`
- TotalPages int `json:"totalPages,omitempty"`
- TotalResults int `json:"totalResults,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_get_keys.go b/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_get_keys.go
deleted file mode 100644
index a6244689a..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_get_keys.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// IamV1GetKeys struct for IamV1GetKeys
-type IamV1GetKeys struct {
- // The unique string that we created to identify the Key resource.
- Sid *string `json:"sid,omitempty"`
- // The string that you assigned to describe the resource.
- FriendlyName *string `json:"friendly_name,omitempty"`
- // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateCreated *string `json:"date_created,omitempty"`
- // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateUpdated *string `json:"date_updated,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_key.go b/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_key.go
deleted file mode 100644
index 5a8036594..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_key.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// IamV1Key struct for IamV1Key
-type IamV1Key struct {
- // The unique string that we created to identify the Key resource.
- Sid *string `json:"sid,omitempty"`
- // The string that you assigned to describe the resource.
- FriendlyName *string `json:"friendly_name,omitempty"`
- // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateCreated *string `json:"date_created,omitempty"`
- // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateUpdated *string `json:"date_updated,omitempty"`
- // The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- Policy *map[string]interface{} `json:"policy,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_new_key.go b/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_new_key.go
deleted file mode 100644
index 30bf7db84..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_new_key.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// IamV1NewKey struct for IamV1NewKey
-type IamV1NewKey struct {
- // The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
- Sid *string `json:"sid,omitempty"`
- // The string that you assigned to describe the resource.
- FriendlyName *string `json:"friendly_name,omitempty"`
- // The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateCreated *string `json:"date_created,omitempty"`
- // The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- DateUpdated *string `json:"date_updated,omitempty"`
- // The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
- Secret *string `json:"secret,omitempty"`
- // Collection of allow assertions.
- Policy *map[string]interface{} `json:"policy,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response_meta.go b/examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response_meta.go
deleted file mode 100644
index 3bea1a4d7..000000000
--- a/examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response_meta.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-// ListGetKeysResponseMeta struct for ListGetKeysResponseMeta
-type ListGetKeysResponseMeta struct {
- FirstPageUrl string `json:"first_page_url,omitempty"`
- Key string `json:"key,omitempty"`
- NextPageUrl *string `json:"next_page_url,omitempty"`
- Page int `json:"page,omitempty"`
- PageSize int `json:"page_size,omitempty"`
- PreviousPageUrl *string `json:"previous_page_url,omitempty"`
- Url string `json:"url,omitempty"`
-}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/README.md b/examples/go/go-client/helper/rest/oauth/v2/README.md
new file mode 100644
index 000000000..3042b978d
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/README.md
@@ -0,0 +1,97 @@
+# Go API client for openapi
+
+User OAuth API
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
+
+- API version: 1.0.0
+- Package version: 1.0.0
+- Build package: com.twilio.oai.TwilioGoGenerator
+For more information, please visit [https://support.twilio.com](https://support.twilio.com)
+
+## Installation
+
+Install the following dependencies:
+
+```shell
+go get github.com/stretchr/testify/assert
+go get golang.org/x/net/context
+```
+
+Put the package under your project folder and add the following in import:
+
+```golang
+import "./openapi"
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://oauth.twilio.com*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*TokenApi* | [**CreateOauth2Token**](docs/TokenApi.md#createoauth2token) | **Post** /v2/token | Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant
+
+
+## Documentation For Models
+
+ - [V2Oauth2TokenResponse](docs/V2Oauth2TokenResponse.md)
+ - [Auth0SignupRequest](docs/Auth0SignupRequest.md)
+ - [Auth0TestLoginResponse](docs/Auth0TestLoginResponse.md)
+ - [Auth0RefreshTokenResponse](docs/Auth0RefreshTokenResponse.md)
+ - [Error](docs/Error.md)
+ - [Auth0RefreshScopedTokenRequest](docs/Auth0RefreshScopedTokenRequest.md)
+ - [Auth0TestLoginRequest](docs/Auth0TestLoginRequest.md)
+ - [Auth0AuthorizeResponse](docs/Auth0AuthorizeResponse.md)
+ - [Auth0AuthenticationCodeExchangeRequest](docs/Auth0AuthenticationCodeExchangeRequest.md)
+ - [Auth0LoginEmailRequest](docs/Auth0LoginEmailRequest.md)
+ - [Auth0TokenResponse](docs/Auth0TokenResponse.md)
+
+
+## Documentation For Authorization
+
+
+
+## accountSid_authToken
+
+- **Type**: HTTP basic authentication
+
+Example
+
+```golang
+auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
+ UserName: "username",
+ Password: "password",
+})
+r, err := client.Service.Operation(auth, args)
+```
+
+
+## v2_oauth2_client_credentials
+
+
+- **Type**: OAuth
+- **Flow**: application
+- **Authorization URL**:
+- **Scopes**: N/A
+
+Example
+
+```golang
+auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
+r, err := client.Service.Operation(auth, args)
+```
+
+Or via OAuth2 module to automatically refresh tokens and perform user authentication.
+
+```golang
+import "golang.org/x/oauth2"
+
+/* Perform OAuth2 round trip request and obtain a token */
+
+tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
+auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
+r, err := client.Service.Operation(auth, args)
+```
+
diff --git a/examples/go/go-client/helper/rest/iam/v1/api_service.go b/examples/go/go-client/helper/rest/oauth/v2/api_service.go
similarity index 90%
rename from examples/go/go-client/helper/rest/iam/v1/api_service.go
rename to examples/go/go-client/helper/rest/oauth/v2/api_service.go
index a7c0f9aaa..8c9df1c36 100644
--- a/examples/go/go-client/helper/rest/iam/v1/api_service.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/api_service.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -30,7 +30,7 @@ func (c *ApiService) RequestHandler() *twilio.RequestHandler {
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService {
return &ApiService{
requestHandler: requestHandler,
- baseURL: "https://iam.twilio.com",
+ baseURL: "https://oauth.twilio.com",
}
}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_request.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_authentication_code_exchange_request.go
similarity index 51%
rename from examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_request.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_auth0_authentication_code_exchange_request.go
index 15a2af22b..780cdb6fb 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_request.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_authentication_code_exchange_request.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,11 +14,10 @@
package openapi
-// IamV1AccountSearchRequest struct for IamV1AccountSearchRequest
-type IamV1AccountSearchRequest struct {
- SearchString *string `json:"searchString,omitempty"`
- ParentAccountId *string `json:"parentAccountId,omitempty"`
- Status *[]int `json:"status,omitempty"`
- Dormant *bool `json:"dormant,omitempty"`
- Trial *bool `json:"trial,omitempty"`
+// Auth0AuthenticationCodeExchangeRequest struct for Auth0AuthenticationCodeExchangeRequest
+type Auth0AuthenticationCodeExchangeRequest struct {
+ AuthorizationCode string `json:"authorizationCode"`
+ State string `json:"state,omitempty"`
+ CodeVerifier string `json:"codeVerifier,omitempty"`
+ Nonce string `json:"nonce,omitempty"`
}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_role_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_authorize_response.go
similarity index 57%
rename from examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_role_response.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_auth0_authorize_response.go
index aadc3d924..7dba4928d 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_search_role_response.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_authorize_response.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,9 +14,9 @@
package openapi
-// IamV1AccountSearchRoleResponse struct for IamV1AccountSearchRoleResponse
-type IamV1AccountSearchRoleResponse struct {
- RoleSid string `json:"roleSid,omitempty"`
- FriendlyName *string `json:"friendlyName,omitempty"`
- Description *string `json:"description,omitempty"`
+// Auth0AuthorizeResponse struct for Auth0AuthorizeResponse
+type Auth0AuthorizeResponse struct {
+ Email string `json:"email,omitempty"`
+ Redirect string `json:"redirect"`
+ IsSso bool `json:"isSso,omitempty"`
}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_login_email_request.go
similarity index 64%
rename from examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_auth0_login_email_request.go
index 3b4200b97..76cd1435f 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_list_get_keys_response.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_login_email_request.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,8 +14,8 @@
package openapi
-// ListGetKeysResponse struct for ListGetKeysResponse
-type ListGetKeysResponse struct {
- Keys []IamV1GetKeys `json:"keys,omitempty"`
- Meta ListGetKeysResponseMeta `json:"meta,omitempty"`
+// Auth0LoginEmailRequest struct for Auth0LoginEmailRequest
+type Auth0LoginEmailRequest struct {
+ Email string `json:"email"`
+ CallbackUri string `json:"callbackUri,omitempty"`
}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_scoped_token_request.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_scoped_token_request.go
new file mode 100644
index 000000000..6bb07a566
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_scoped_token_request.go
@@ -0,0 +1,22 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package openapi
+
+// Auth0RefreshScopedTokenRequest struct for Auth0RefreshScopedTokenRequest
+type Auth0RefreshScopedTokenRequest struct {
+ // The SID of the account to be authorized for the user.
+ AccountSid string `json:"accountSid,omitempty"`
+ AuthorizationContext string `json:"authorizationContext,omitempty"`
+}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_stats_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_token_response.go
similarity index 67%
rename from examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_stats_response.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_token_response.go
index b43848632..33a049439 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_iam_v1_account_stats_response.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_refresh_token_response.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,7 +14,7 @@
package openapi
-// IamV1AccountStatsResponse struct for IamV1AccountStatsResponse
-type IamV1AccountStatsResponse struct {
- NumberOfAccounts int `json:"numberOfAccounts,omitempty"`
+// Auth0RefreshTokenResponse struct for Auth0RefreshTokenResponse
+type Auth0RefreshTokenResponse struct {
+ AccessToken string `json:"accessToken"`
}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/model_auth0_signup_request.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_signup_request.go
new file mode 100644
index 000000000..85a1201f2
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_signup_request.go
@@ -0,0 +1,24 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package openapi
+
+// Auth0SignupRequest struct for Auth0SignupRequest
+type Auth0SignupRequest struct {
+ Email string `json:"email"`
+ Deeplink string `json:"deeplink,omitempty"`
+ OrganizationSid string `json:"organizationSid,omitempty"`
+ NotificationSid string `json:"notificationSid,omitempty"`
+ OneConsole bool `json:"oneConsole,omitempty"`
+}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_request.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_request.go
new file mode 100644
index 000000000..010788c83
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_request.go
@@ -0,0 +1,21 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package openapi
+
+// Auth0TestLoginRequest struct for Auth0TestLoginRequest
+type Auth0TestLoginRequest struct {
+ Email string `json:"email"`
+ Password string `json:"password"`
+}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_response.go
new file mode 100644
index 000000000..32c02b52f
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_test_login_response.go
@@ -0,0 +1,21 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package openapi
+
+// Auth0TestLoginResponse struct for Auth0TestLoginResponse
+type Auth0TestLoginResponse struct {
+ AccessToken string `json:"accessToken"`
+ IdToken string `json:"idToken,omitempty"`
+}
diff --git a/examples/go/go-client/helper/rest/oauth/v2/model_auth0_token_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_token_response.go
new file mode 100644
index 000000000..ba480892a
--- /dev/null
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_auth0_token_response.go
@@ -0,0 +1,23 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package openapi
+
+// Auth0TokenResponse struct for Auth0TokenResponse
+type Auth0TokenResponse struct {
+ AccessToken string `json:"accessToken"`
+ IdToken string `json:"idToken"`
+ AuthContext string `json:"authContext"`
+ IsPurgatory bool `json:"isPurgatory"`
+}
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_twilio_service_error_response.go b/examples/go/go-client/helper/rest/oauth/v2/model_error.go
similarity index 81%
rename from examples/go/go-client/helper/rest/iam/v1/model_twilio_service_error_response.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_error.go
index 063f68300..e9162adaf 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_twilio_service_error_response.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_error.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,8 +14,8 @@
package openapi
-// TwilioServiceErrorResponse struct for TwilioServiceErrorResponse
-type TwilioServiceErrorResponse struct {
+// Error Generic error
+type Error struct {
// Twilio-specific error code
Code int `json:"code,omitempty"`
// Error message
diff --git a/examples/go/go-client/helper/rest/iam/v1/model_oauth_v1_token.go b/examples/go/go-client/helper/rest/oauth/v2/model_v2_oauth2_token_response.go
similarity index 87%
rename from examples/go/go-client/helper/rest/iam/v1/model_oauth_v1_token.go
rename to examples/go/go-client/helper/rest/oauth/v2/model_v2_oauth2_token_response.go
index cc101fc4c..8dce26a91 100644
--- a/examples/go/go-client/helper/rest/iam/v1/model_oauth_v1_token.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/model_v2_oauth2_token_response.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -14,8 +14,8 @@
package openapi
-// OauthV1Token struct for OauthV1Token
-type OauthV1Token struct {
+// V2Oauth2TokenResponse struct for V2Oauth2TokenResponse
+type V2Oauth2TokenResponse struct {
// Token which carries the necessary information to access a Twilio resource directly.
AccessToken *string `json:"access_token,omitempty"`
// Token which carries the information necessary to get a new access token.
diff --git a/examples/go/go-client/helper/rest/iam/v1/token.go b/examples/go/go-client/helper/rest/oauth/v2/token.go
similarity index 72%
rename from examples/go/go-client/helper/rest/iam/v1/token.go
rename to examples/go/go-client/helper/rest/oauth/v2/token.go
index bea501ca2..8407fe9ff 100644
--- a/examples/go/go-client/helper/rest/iam/v1/token.go
+++ b/examples/go/go-client/helper/rest/oauth/v2/token.go
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -19,8 +19,8 @@ import (
"net/url"
)
-// Optional parameters for the method 'CreateToken'
-type CreateTokenParams struct {
+// Optional parameters for the method 'CreateOauth2Token'
+type CreateOauth2TokenParams struct {
// Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
GrantType *string `json:"grant_type,omitempty"`
// A 34 character string that uniquely identifies this OAuth App.
@@ -39,41 +39,41 @@ type CreateTokenParams struct {
Scope *string `json:"scope,omitempty"`
}
-func (params *CreateTokenParams) SetGrantType(GrantType string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetGrantType(GrantType string) *CreateOauth2TokenParams {
params.GrantType = &GrantType
return params
}
-func (params *CreateTokenParams) SetClientId(ClientId string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetClientId(ClientId string) *CreateOauth2TokenParams {
params.ClientId = &ClientId
return params
}
-func (params *CreateTokenParams) SetClientSecret(ClientSecret string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetClientSecret(ClientSecret string) *CreateOauth2TokenParams {
params.ClientSecret = &ClientSecret
return params
}
-func (params *CreateTokenParams) SetCode(Code string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetCode(Code string) *CreateOauth2TokenParams {
params.Code = &Code
return params
}
-func (params *CreateTokenParams) SetRedirectUri(RedirectUri string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetRedirectUri(RedirectUri string) *CreateOauth2TokenParams {
params.RedirectUri = &RedirectUri
return params
}
-func (params *CreateTokenParams) SetAudience(Audience string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetAudience(Audience string) *CreateOauth2TokenParams {
params.Audience = &Audience
return params
}
-func (params *CreateTokenParams) SetRefreshToken(RefreshToken string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetRefreshToken(RefreshToken string) *CreateOauth2TokenParams {
params.RefreshToken = &RefreshToken
return params
}
-func (params *CreateTokenParams) SetScope(Scope string) *CreateTokenParams {
+func (params *CreateOauth2TokenParams) SetScope(Scope string) *CreateOauth2TokenParams {
params.Scope = &Scope
return params
}
-func (c *ApiService) CreateToken(params *CreateTokenParams) (*OauthV1Token, error) {
- path := "/v1/token"
+func (c *ApiService) CreateOauth2Token(params *CreateOauth2TokenParams) (*V2Oauth2TokenResponse, error) {
+ path := "/v2/token"
data := url.Values{}
headers := map[string]interface{}{
@@ -112,7 +112,7 @@ func (c *ApiService) CreateToken(params *CreateTokenParams) (*OauthV1Token, erro
defer resp.Body.Close()
- ps := &OauthV1Token{}
+ ps := &V2Oauth2TokenResponse{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
diff --git a/examples/go/go-client/terraform/resources/iam/v1/README.md b/examples/go/go-client/terraform/resources/iam/v1/README.md
deleted file mode 100644
index ad997450c..000000000
--- a/examples/go/go-client/terraform/resources/iam/v1/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-## twilio_iam_keys_v1
-
-### Parameters
-
-Name | Type | Requirement | Description
---- | --- | --- | ---
-**account_sid** | string | **Required** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
-**friendly_name** | string | Optional | A descriptive string that you create to describe the resource. It can be up to 64 characters long.
-**key_type** | string | Optional |
-**policy** | string | Optional | The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-**sid** | string | *Computed* | The Twilio-provided string that uniquely identifies the Key resource to update.
-
diff --git a/examples/go/go-client/terraform/resources/iam/v1/api_default.go b/examples/go/go-client/terraform/resources/iam/v1/api_default.go
deleted file mode 100644
index 30059241d..000000000
--- a/examples/go/go-client/terraform/resources/iam/v1/api_default.go
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package openapi
-
-import (
- "context"
- "fmt"
- "strings"
-
- "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
- "github.com/twilio/terraform-provider-twilio/client"
- . "github.com/twilio/terraform-provider-twilio/core"
- . "github.com/twilio/twilio-go/rest/iam/v1"
-)
-
-func ResourceKeys() *schema.Resource {
- return &schema.Resource{
- CreateContext: createKeys,
- ReadContext: readKeys,
- UpdateContext: updateKeys,
- DeleteContext: deleteKeys,
- Schema: map[string]*schema.Schema{
- "account_sid": AsString(SchemaForceNewRequired),
- "friendly_name": AsString(SchemaComputedOptional),
- "key_type": AsString(SchemaForceNewOptional),
- "policy": AsString(SchemaComputedOptional),
- "sid": AsString(SchemaComputed),
- },
- Importer: &schema.ResourceImporter{
- StateContext: func(ctx context.Context, d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) {
- err := parseKeysImportId(d.Id(), d)
- if err != nil {
- return nil, err
- }
-
- return []*schema.ResourceData{d}, nil
- },
- },
- }
-}
-
-func createKeys(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
- params := CreateNewKeyParams{}
- if err := UnmarshalSchema(¶ms, d); err != nil {
- return diag.FromErr(err)
- }
-
- r, err := m.(*client.Config).Client.IamV1.CreateNewKey(¶ms)
- if err != nil {
- return diag.FromErr(err)
- }
-
- idParts := []string{}
- idParts = append(idParts, (*r.Sid))
- d.SetId(strings.Join(idParts, "/"))
-
- err = MarshalSchema(d, r)
- if err != nil {
- return diag.FromErr(err)
- }
-
- return nil
-}
-
-func deleteKeys(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
-
- sid := d.Get("sid").(string)
-
- err := m.(*client.Config).Client.IamV1.DeleteKey(sid)
- if err != nil {
- return diag.FromErr(err)
- }
-
- d.SetId("")
-
- return nil
-}
-
-func readKeys(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
-
- sid := d.Get("sid").(string)
-
- r, err := m.(*client.Config).Client.IamV1.FetchKey(sid)
- if err != nil {
- return diag.FromErr(err)
- }
-
- err = MarshalSchema(d, r)
- if err != nil {
- return diag.FromErr(err)
- }
-
- return nil
-}
-
-func parseKeysImportId(importId string, d *schema.ResourceData) error {
- importParts := strings.Split(importId, "/")
- errStr := "invalid import ID (%q), expected sid"
-
- if len(importParts) != 1 {
- return fmt.Errorf(errStr, importId)
- }
-
- d.Set("sid", importParts[0])
-
- return nil
-}
-func updateKeys(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
- params := UpdateKeyParams{}
- if err := UnmarshalSchema(¶ms, d); err != nil {
- return diag.FromErr(err)
- }
-
- sid := d.Get("sid").(string)
-
- r, err := m.(*client.Config).Client.IamV1.UpdateKey(sid, ¶ms)
- if err != nil {
- return diag.FromErr(err)
- }
-
- err = MarshalSchema(d, r)
- if err != nil {
- return diag.FromErr(err)
- }
-
- return nil
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java
deleted file mode 100644
index bcf936e19..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.base.Resource;
-import com.twilio.converter.Converter;
-import java.util.Currency;
-import com.twilio.converter.DateConverter;
-import com.twilio.converter.Promoter;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.CurrencyDeserializer;
-import com.twilio.exception.ApiConnectionException;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Request;
-import com.twilio.http.Response;
-import com.twilio.http.TwilioRestClient;
-import com.twilio.rest.Domains;
-
-import lombok.ToString;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.time.ZonedDateTime;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
-
-import java.util.Map;
-import java.time.LocalDate;
-import java.math.BigDecimal;
-import com.twilio.type.PhoneNumberCapabilities;
-import com.twilio.type.FeedbackIssue;
-import com.twilio.type.IceServer;
-import com.twilio.type.InboundCallPrice;
-import com.twilio.type.OutboundPrefixPriceWithOrigin;
-import com.twilio.type.OutboundPrefixPrice;
-import com.twilio.type.OutboundCallPriceWithOrigin;
-import com.twilio.type.PhoneNumberPrice;
-import com.twilio.type.InboundSmsPrice;
-import com.twilio.type.OutboundSmsPrice;
-import com.twilio.type.OutboundCallPrice;
-import com.twilio.type.RecordingRule;
-import com.twilio.type.SubscribeRule;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-@ToString
-public class ApiKey extends Resource {
- private static final long serialVersionUID = 99197666922652L;
-
-
-
- public static ApiKeyDeleter deleter(final String pathSid){
- return new ApiKeyDeleter(pathSid);
- }
-
- public static ApiKeyFetcher fetcher(final String pathSid){
- return new ApiKeyFetcher(pathSid);
- }
-
- public static ApiKeyUpdater updater(final String pathSid){
- return new ApiKeyUpdater(pathSid);
- }
-
- /**
- * Converts a JSON String into a ApiKey object using the provided ObjectMapper.
- *
- * @param json Raw JSON String
- * @param objectMapper Jackson ObjectMapper
- * @return ApiKey object represented by the provided JSON
- */
- public static ApiKey fromJson(final String json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, ApiKey.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- /**
- * Converts a JSON InputStream into a ApiKey object using the provided
- * ObjectMapper.
- *
- * @param json Raw JSON InputStream
- * @param objectMapper Jackson ObjectMapper
- * @return ApiKey object represented by the provided JSON
- */
- public static ApiKey fromJson(final InputStream json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, ApiKey.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- private final String sid;
- private final String friendlyName;
- private final ZonedDateTime dateCreated;
- private final ZonedDateTime dateUpdated;
- private final Map policy;
-
- @JsonCreator
- private ApiKey(
- @JsonProperty("sid")
- final String sid,
-
- @JsonProperty("friendly_name")
- final String friendlyName,
-
- @JsonProperty("date_created")
- final String dateCreated,
-
- @JsonProperty("date_updated")
- final String dateUpdated,
-
- @JsonProperty("policy")
- final Map policy
- ) {
- this.sid = sid;
- this.friendlyName = friendlyName;
- this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
- this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
- this.policy = policy;
- }
-
- public final String getSid() {
- return this.sid;
- }
- public final String getFriendlyName() {
- return this.friendlyName;
- }
- public final ZonedDateTime getDateCreated() {
- return this.dateCreated;
- }
- public final ZonedDateTime getDateUpdated() {
- return this.dateUpdated;
- }
- public final Map getPolicy() {
- return this.policy;
- }
-
- @Override
- public boolean equals(final Object o) {
- if (this==o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- ApiKey other = (ApiKey) o;
-
- return Objects.equals(sid, other.sid) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(policy, other.policy) ;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(sid, friendlyName, dateCreated, dateUpdated, policy);
- }
-
-
-}
-
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyDeleter.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyDeleter.java
deleted file mode 100644
index 449452a1a..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyDeleter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.converter.Promoter;
-import com.twilio.constant.EnumConstants;
-import com.twilio.exception.ApiConnectionException;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.exception.ApiException;
-import com.twilio.converter.Converter;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Response;
-import com.twilio.rest.Domains;
-import java.time.LocalDate;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.time.ZonedDateTime;
-import java.time.format.DateTimeFormatter;
-import com.twilio.converter.DateConverter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.ToString;
-
-import com.twilio.base.Deleter;
-import com.twilio.http.Request;
-import com.twilio.http.TwilioRestClient;
-
-public class ApiKeyDeleter extends Deleter {
- private String pathSid;
-
- public ApiKeyDeleter(final String pathSid){
- this.pathSid = pathSid;
- }
-
-
- @Override
- public boolean delete(final TwilioRestClient client) {
- String path = "/v1/Keys/{Sid}";
-
- path = path.replace("{"+"Sid"+"}", this.pathSid.toString());
-
- Request request = new Request(
- HttpMethod.DELETE,
- Domains.IAM.toString(),
- path
- );
- request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
- Response response = client.request(request);
-
- if (response == null) {
- throw new ApiConnectionException("ApiKey delete failed: Unable to connect to server");
- } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
- RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
- if (restException == null) {
- throw new ApiException("Server Error, no content", response.getStatusCode());
- }
- throw new ApiException(restException);
- }
- return response.getStatusCode() == 204;
- }
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyFetcher.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyFetcher.java
deleted file mode 100644
index 726ee1191..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyFetcher.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.constant.EnumConstants;
-import com.twilio.converter.Promoter;
-import com.twilio.exception.ApiConnectionException;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.Converter;
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Response;
-import com.twilio.rest.Domains;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.time.ZonedDateTime;
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import com.twilio.converter.DateConverter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.ToString;
-
-import com.twilio.base.Fetcher;
-import com.twilio.http.Request;
-import com.twilio.http.TwilioRestClient;
-
-public class ApiKeyFetcher extends Fetcher {
- private String pathSid;
-
- public ApiKeyFetcher(final String pathSid){
- this.pathSid = pathSid;
- }
-
-
- @Override
- public ApiKey fetch(final TwilioRestClient client) {
- String path = "/v1/Keys/{Sid}";
-
- path = path.replace("{"+"Sid"+"}", this.pathSid.toString());
-
- Request request = new Request(
- HttpMethod.GET,
- Domains.IAM.toString(),
- path
- );
- request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
- Response response = client.request(request);
-
- if (response == null) {
- throw new ApiConnectionException("ApiKey fetch failed: Unable to connect to server");
- } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
- RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
- if (restException == null) {
- throw new ApiException("Server Error, no content", response.getStatusCode());
- }
- throw new ApiException(restException);
- }
-
- return ApiKey.fromJson(response.getStream(), client.getObjectMapper());
- }
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java
deleted file mode 100644
index 3900f6961..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.constant.EnumConstants;
-import com.twilio.converter.Promoter;
-import com.twilio.exception.ApiConnectionException;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.Converter;
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Response;
-import com.twilio.rest.Domains;
-import java.time.format.DateTimeFormatter;
-import com.twilio.converter.DateConverter;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.time.ZonedDateTime;
-import java.time.LocalDate;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.ToString;
-
-import com.twilio.base.Updater;
-import com.twilio.http.Request;
-import com.twilio.http.TwilioRestClient;
-
-
-public class ApiKeyUpdater extends Updater{
- private String pathSid;
- private String friendlyName;
- private Object policy;
-
- public ApiKeyUpdater(final String pathSid){
- this.pathSid = pathSid;
- }
-
- public ApiKeyUpdater setFriendlyName(final String friendlyName){
- this.friendlyName = friendlyName;
- return this;
- }
- public ApiKeyUpdater setPolicy(final Object policy){
- this.policy = policy;
- return this;
- }
-
- @Override
- public ApiKey update(final TwilioRestClient client){
- String path = "/v1/Keys/{Sid}";
-
- path = path.replace("{"+"Sid"+"}", this.pathSid.toString());
-
- Request request = new Request(
- HttpMethod.POST,
- Domains.IAM.toString(),
- path
- );
- request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
- addPostParams(request);
- Response response = client.request(request);
- if (response == null) {
- throw new ApiConnectionException("ApiKey update failed: Unable to connect to server");
- } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
- RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
- if (restException == null) {
- throw new ApiException("Server Error, no content", response.getStatusCode());
- }
- throw new ApiException(restException);
- }
-
- return ApiKey.fromJson(response.getStream(), client.getObjectMapper());
- }
-
- private void addPostParams(final Request request) {
- if (friendlyName != null) {
- request.addPostParam("FriendlyName", friendlyName);
-
- }
- if (policy != null) {
- request.addPostParam("Policy", Converter.objectToJson(policy));
-
- }
- }
-
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java
deleted file mode 100644
index ca0b884f6..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.base.Resource;
-import com.twilio.converter.Converter;
-import java.util.Currency;
-import com.twilio.converter.DateConverter;
-import com.twilio.converter.Promoter;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.CurrencyDeserializer;
-import com.twilio.exception.ApiConnectionException;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Request;
-import com.twilio.http.Response;
-import com.twilio.http.TwilioRestClient;
-import com.twilio.rest.Domains;
-
-import lombok.ToString;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.time.ZonedDateTime;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
-
-import java.util.Map;
-import java.time.LocalDate;
-import java.math.BigDecimal;
-import com.twilio.type.PhoneNumberCapabilities;
-import com.twilio.type.FeedbackIssue;
-import com.twilio.type.IceServer;
-import com.twilio.type.InboundCallPrice;
-import com.twilio.type.OutboundPrefixPriceWithOrigin;
-import com.twilio.type.OutboundPrefixPrice;
-import com.twilio.type.OutboundCallPriceWithOrigin;
-import com.twilio.type.PhoneNumberPrice;
-import com.twilio.type.InboundSmsPrice;
-import com.twilio.type.OutboundSmsPrice;
-import com.twilio.type.OutboundCallPrice;
-import com.twilio.type.RecordingRule;
-import com.twilio.type.SubscribeRule;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-@ToString
-public class GetApiKeys extends Resource {
- private static final long serialVersionUID = 35259719636912L;
-
-
-
- public static GetApiKeysReader reader(final String accountSid){
- return new GetApiKeysReader(accountSid);
- }
-
- /**
- * Converts a JSON String into a GetApiKeys object using the provided ObjectMapper.
- *
- * @param json Raw JSON String
- * @param objectMapper Jackson ObjectMapper
- * @return GetApiKeys object represented by the provided JSON
- */
- public static GetApiKeys fromJson(final String json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, GetApiKeys.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- /**
- * Converts a JSON InputStream into a GetApiKeys object using the provided
- * ObjectMapper.
- *
- * @param json Raw JSON InputStream
- * @param objectMapper Jackson ObjectMapper
- * @return GetApiKeys object represented by the provided JSON
- */
- public static GetApiKeys fromJson(final InputStream json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, GetApiKeys.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- private final String sid;
- private final String friendlyName;
- private final ZonedDateTime dateCreated;
- private final ZonedDateTime dateUpdated;
-
- @JsonCreator
- private GetApiKeys(
- @JsonProperty("sid")
- final String sid,
-
- @JsonProperty("friendly_name")
- final String friendlyName,
-
- @JsonProperty("date_created")
- final String dateCreated,
-
- @JsonProperty("date_updated")
- final String dateUpdated
- ) {
- this.sid = sid;
- this.friendlyName = friendlyName;
- this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
- this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
- }
-
- public final String getSid() {
- return this.sid;
- }
- public final String getFriendlyName() {
- return this.friendlyName;
- }
- public final ZonedDateTime getDateCreated() {
- return this.dateCreated;
- }
- public final ZonedDateTime getDateUpdated() {
- return this.dateUpdated;
- }
-
- @Override
- public boolean equals(final Object o) {
- if (this==o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- GetApiKeys other = (GetApiKeys) o;
-
- return Objects.equals(sid, other.sid) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) ;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(sid, friendlyName, dateCreated, dateUpdated);
- }
-
-
-}
-
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeysReader.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeysReader.java
deleted file mode 100644
index e7bd7f0ad..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/GetApiKeysReader.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.constant.EnumConstants;
-import com.twilio.converter.Promoter;
-import com.twilio.exception.ApiConnectionException;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.Converter;
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Response;
-import com.twilio.rest.Domains;
-import java.time.LocalDate;
-import java.time.ZonedDateTime;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.time.format.DateTimeFormatter;
-import com.twilio.converter.DateConverter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.ToString;
-
-import com.twilio.base.Page;
-import com.twilio.base.Reader;
-import com.twilio.base.ResourceSet;
-import com.twilio.http.Request;
-import com.twilio.http.TwilioRestClient;
-
-public class GetApiKeysReader extends Reader {
- private String accountSid;
- private Long pageSize;
-
- public GetApiKeysReader(final String accountSid){
- this.accountSid = accountSid;
- }
-
- public GetApiKeysReader setAccountSid(final String accountSid){
- this.accountSid = accountSid;
- return this;
- }
- public GetApiKeysReader setPageSize(final Long pageSize){
- this.pageSize = pageSize;
- return this;
- }
-
- @Override
- public ResourceSet read(final TwilioRestClient client) {
- return new ResourceSet<>(this, client, firstPage(client));
- }
-
- public Page firstPage(final TwilioRestClient client) {
- String path = "/v1/Keys";
- path = path.replace("{"+"AccountSid"+"}", this.accountSid.toString());
-
- Request request = new Request(
- HttpMethod.GET,
- Domains.IAM.toString(),
- path
- );
-
- addQueryParams(request);
- request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
- return pageForRequest(client, request);
- }
-
- private Page pageForRequest(final TwilioRestClient client, final Request request) {
- Response response = client.request(request);
-
- if (response == null) {
- throw new ApiConnectionException("GetApiKeys read failed: Unable to connect to server");
- } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
- RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
- if (restException == null) {
- throw new ApiException("Server Error, no content", response.getStatusCode());
- }
- throw new ApiException(restException);
- }
-
- return Page.fromJson(
- "keys",
- response.getContent(),
- GetApiKeys.class,
- client.getObjectMapper()
- );
- }
-
- @Override
- public Page previousPage(final Page page, final TwilioRestClient client) {
- Request request = new Request(
- HttpMethod.GET,
- page.getPreviousPageUrl(Domains.IAM.toString())
- );
- return pageForRequest(client, request);
- }
-
-
- @Override
- public Page nextPage(final Page page, final TwilioRestClient client) {
- Request request = new Request(
- HttpMethod.GET,
- page.getNextPageUrl(Domains.IAM.toString())
- );
- return pageForRequest(client, request);
- }
-
- @Override
- public Page getPage(final String targetUrl, final TwilioRestClient client) {
- Request request = new Request(
- HttpMethod.GET,
- targetUrl
- );
-
- return pageForRequest(client, request);
- }
- private void addQueryParams(final Request request) {
- if (accountSid != null) {
-
- request.addQueryParam("AccountSid", accountSid);
- }
- if (pageSize != null) {
-
- request.addQueryParam("PageSize", pageSize.toString());
- }
-
- if(getPageSize() != null) {
- request.addQueryParam("PageSize", Integer.toString(getPageSize()));
- }
- }
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java
deleted file mode 100644
index 54fc4d897..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.base.Resource;
-import com.twilio.converter.Converter;
-import java.util.Currency;
-import com.twilio.converter.DateConverter;
-import com.twilio.converter.Promoter;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.CurrencyDeserializer;
-import com.twilio.exception.ApiConnectionException;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Request;
-import com.twilio.http.Response;
-import com.twilio.http.TwilioRestClient;
-import com.twilio.rest.Domains;
-
-import lombok.ToString;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.time.ZonedDateTime;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
-
-import java.util.Map;
-import java.time.LocalDate;
-import java.math.BigDecimal;
-import com.twilio.type.PhoneNumberCapabilities;
-import com.twilio.type.FeedbackIssue;
-import com.twilio.type.IceServer;
-import com.twilio.type.InboundCallPrice;
-import com.twilio.type.OutboundPrefixPriceWithOrigin;
-import com.twilio.type.OutboundPrefixPrice;
-import com.twilio.type.OutboundCallPriceWithOrigin;
-import com.twilio.type.PhoneNumberPrice;
-import com.twilio.type.InboundSmsPrice;
-import com.twilio.type.OutboundSmsPrice;
-import com.twilio.type.OutboundCallPrice;
-import com.twilio.type.RecordingRule;
-import com.twilio.type.SubscribeRule;
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-@ToString
-public class NewApiKey extends Resource {
- private static final long serialVersionUID = 217181042856619L;
-
-
-
- public static NewApiKeyCreator creator(final String accountSid){
- return new NewApiKeyCreator(accountSid);
- }
-
- /**
- * Converts a JSON String into a NewApiKey object using the provided ObjectMapper.
- *
- * @param json Raw JSON String
- * @param objectMapper Jackson ObjectMapper
- * @return NewApiKey object represented by the provided JSON
- */
- public static NewApiKey fromJson(final String json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, NewApiKey.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- /**
- * Converts a JSON InputStream into a NewApiKey object using the provided
- * ObjectMapper.
- *
- * @param json Raw JSON InputStream
- * @param objectMapper Jackson ObjectMapper
- * @return NewApiKey object represented by the provided JSON
- */
- public static NewApiKey fromJson(final InputStream json, final ObjectMapper objectMapper) {
- // Convert all checked exceptions to Runtime
- try {
- return objectMapper.readValue(json, NewApiKey.class);
- } catch (final JsonMappingException | JsonParseException e) {
- throw new ApiException(e.getMessage(), e);
- } catch (final IOException e) {
- throw new ApiConnectionException(e.getMessage(), e);
- }
- }
-
- private final String sid;
- private final String friendlyName;
- private final ZonedDateTime dateCreated;
- private final ZonedDateTime dateUpdated;
- private final String secret;
- private final Map policy;
-
- @JsonCreator
- private NewApiKey(
- @JsonProperty("sid")
- final String sid,
-
- @JsonProperty("friendly_name")
- final String friendlyName,
-
- @JsonProperty("date_created")
- final String dateCreated,
-
- @JsonProperty("date_updated")
- final String dateUpdated,
-
- @JsonProperty("secret")
- final String secret,
-
- @JsonProperty("policy")
- final Map policy
- ) {
- this.sid = sid;
- this.friendlyName = friendlyName;
- this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
- this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
- this.secret = secret;
- this.policy = policy;
- }
-
- public final String getSid() {
- return this.sid;
- }
- public final String getFriendlyName() {
- return this.friendlyName;
- }
- public final ZonedDateTime getDateCreated() {
- return this.dateCreated;
- }
- public final ZonedDateTime getDateUpdated() {
- return this.dateUpdated;
- }
- public final String getSecret() {
- return this.secret;
- }
- public final Map getPolicy() {
- return this.policy;
- }
-
- @Override
- public boolean equals(final Object o) {
- if (this==o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- NewApiKey other = (NewApiKey) o;
-
- return Objects.equals(sid, other.sid) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(secret, other.secret) && Objects.equals(policy, other.policy) ;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(sid, friendlyName, dateCreated, dateUpdated, secret, policy);
- }
-
- public enum Keytype {
- RESTRICTED("restricted");
-
- private final String value;
-
- private Keytype(final String value) {
- this.value = value;
- }
-
- public String toString() {
- return value;
- }
-
- @JsonCreator
- public static Keytype forValue(final String value) {
- return Promoter.enumFromString(value, Keytype.values());
- }
- }
-
-}
-
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java
deleted file mode 100644
index bcd668f15..000000000
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.twilio.rest.iam.v1;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.twilio.constant.EnumConstants;
-import com.twilio.converter.Promoter;
-import com.twilio.exception.ApiConnectionException;
-import com.twilio.converter.PrefixedCollapsibleMap;
-import com.twilio.converter.Converter;
-import com.twilio.exception.ApiException;
-import com.twilio.exception.RestException;
-import com.twilio.http.HttpMethod;
-import com.twilio.http.Response;
-import com.twilio.rest.Domains;
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-import java.time.LocalDate;
-import com.twilio.converter.Converter;
-import java.time.ZonedDateTime;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.time.format.DateTimeFormatter;
-import com.twilio.converter.DateConverter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.UUID;
-
-import lombok.ToString;
-
-import java.net.URI;
-
-import com.twilio.base.Creator;
-import com.twilio.http.Request;
-import com.twilio.http.TwilioRestClient;
-
-public class NewApiKeyCreator extends Creator{
- private String accountSid;
- private String friendlyName;
- private NewApiKey.Keytype keyType;
- private Object policy;
-
- public NewApiKeyCreator(final String accountSid) {
- this.accountSid = accountSid;
- }
-
- public NewApiKeyCreator setAccountSid(final String accountSid){
- this.accountSid = accountSid;
- return this;
- }
- public NewApiKeyCreator setFriendlyName(final String friendlyName){
- this.friendlyName = friendlyName;
- return this;
- }
- public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType){
- this.keyType = keyType;
- return this;
- }
- public NewApiKeyCreator setPolicy(final Object policy){
- this.policy = policy;
- return this;
- }
-
- @Override
- public NewApiKey create(final TwilioRestClient client){
- String path = "/v1/Keys";
-
- path = path.replace("{"+"AccountSid"+"}", this.accountSid.toString());
-
- Request request = new Request(
- HttpMethod.POST,
- Domains.IAM.toString(),
- path
- );
- request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
- addPostParams(request);
- Response response = client.request(request);
- if (response == null) {
- throw new ApiConnectionException("NewApiKey creation failed: Unable to connect to server");
- } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
- RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
- if (restException == null) {
- throw new ApiException("Server Error, no content", response.getStatusCode());
- }
- throw new ApiException(restException);
- }
-
- return NewApiKey.fromJson(response.getStream(), client.getObjectMapper());
- }
- private void addPostParams(final Request request) {
- if (accountSid != null) {
- request.addPostParam("AccountSid", accountSid);
-
- }
- if (friendlyName != null) {
- request.addPostParam("FriendlyName", friendlyName);
-
- }
- if (keyType != null) {
- request.addPostParam("KeyType", keyType.toString());
-
- }
- if (policy != null) {
- request.addPostParam("Policy", Converter.objectToJson(policy));
-
- }
- }
-
-}
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/Token.java b/examples/java/src/main/java/com/twilio/rest/oauth/v2/Token.java
similarity index 96%
rename from examples/java/src/main/java/com/twilio/rest/iam/v1/Token.java
rename to examples/java/src/main/java/com/twilio/rest/oauth/v2/Token.java
index abafa6a6f..d41b7cfb8 100644
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/Token.java
+++ b/examples/java/src/main/java/com/twilio/rest/oauth/v2/Token.java
@@ -4,15 +4,15 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.twilio.rest.iam.v1;
+package com.twilio.rest.oauth.v2;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -81,8 +81,8 @@ public class Token extends Resource {
- public static TokenCreator creator(final String grantType, final String clientId){
- return new TokenCreator(grantType, clientId);
+ public static TokenCreator creator(){
+ return new TokenCreator();
}
/**
diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java b/examples/java/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java
similarity index 91%
rename from examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java
rename to examples/java/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java
index 8efed5e4a..4e41d3edd 100644
--- a/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java
+++ b/examples/java/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java
@@ -4,15 +4,15 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.twilio.rest.iam.v1;
+package com.twilio.rest.oauth.v2;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.constant.EnumConstants;
@@ -63,9 +63,7 @@ public class TokenCreator extends Creator{
private String refreshToken;
private String scope;
- public TokenCreator(final String grantType, final String clientId) {
- this.grantType = grantType;
- this.clientId = clientId;
+ public TokenCreator() {
}
public TokenCreator setGrantType(final String grantType){
@@ -103,14 +101,12 @@ public TokenCreator setScope(final String scope){
@Override
public Token create(final NoAuthTwilioRestClient client){
- String path = "/v1/token";
+ String path = "/v2/token";
- path = path.replace("{"+"grant_type"+"}", this.grantType.toString());
- path = path.replace("{"+"client_id"+"}", this.clientId.toString());
NoAuthRequest request = new NoAuthRequest(
HttpMethod.POST,
- Domains.IAM.toString(),
+ Domains.OAUTH.toString(),
path
);
request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
diff --git a/examples/node/src/rest/IamBase.ts b/examples/node/src/rest/OauthBase.ts
similarity index 69%
rename from examples/node/src/rest/IamBase.ts
rename to examples/node/src/rest/OauthBase.ts
index 575e678e5..c0d6a72cc 100644
--- a/examples/node/src/rest/IamBase.ts
+++ b/examples/node/src/rest/OauthBase.ts
@@ -10,24 +10,24 @@
*/
import Domain from "../base/Domain";
-import V1 from "./iam/V1";
+import V2 from "./oauth/V2";
-class IamBase extends Domain {
- _v1?: V1;
+class OauthBase extends Domain {
+ _v2?: V2;
/**
- * Initialize iam domain
+ * Initialize oauth domain
*
* @param twilio - The twilio client
*/
constructor(twilio: any) {
- super(twilio, "https://iam.twilio.com");
+ super(twilio, "https://oauth.twilio.com");
}
- get v1(): V1 {
- this._v1 = this._v1 || new V1(this);
- return this._v1;
+ get v2(): V2 {
+ this._v2 = this._v2 || new V2(this);
+ return this._v2;
}
}
-export = IamBase;
+export = OauthBase;
diff --git a/examples/node/src/rest/Twilio.ts b/examples/node/src/rest/Twilio.ts
index c419ffb96..8f89fb540 100644
--- a/examples/node/src/rest/Twilio.ts
+++ b/examples/node/src/rest/Twilio.ts
@@ -3,7 +3,7 @@ import ApiBase from "./ApiBase";
import FlexApiBase from "./FlexApiBase";
import VersionlessBase from "./VersionlessBase";
import PreviewIamBase = require("./PreviewIamBase");
-import IamBase = require("./IamBase");
+import OauthBase = require("./OauthBase");
class Twilio extends Client {
constructor(username?: string, password?: string, opts?: ClientOpts) {
@@ -26,8 +26,8 @@ class Twilio extends Client {
return new PreviewIamBase(this);
}
- get iam(): IamBase {
- return new IamBase(this);
+ get oauth(): OauthBase {
+ return new OauthBase(this);
}
}
diff --git a/examples/node/src/rest/iam/V1.ts b/examples/node/src/rest/iam/V1.ts
deleted file mode 100644
index 028efba9a..000000000
--- a/examples/node/src/rest/iam/V1.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-import IamBase from "../IamBase";
-import Version from "../../base/Version";
-import { ApiKeyListInstance } from "./v1/apiKey";
-import { GetApiKeysListInstance } from "./v1/getApiKeys";
-import { NewApiKeyListInstance } from "./v1/newApiKey";
-import { TokenListInstance } from "./v1/token";
-
-export default class V1 extends Version {
- /**
- * Initialize the V1 version of Iam
- *
- * @param domain - The Twilio (Twilio.Iam) domain
- */
- constructor(domain: IamBase) {
- super(domain, "v1");
- }
-
- /** apiKey - { Twilio.Iam.V1.ApiKeyListInstance } resource */
- protected _apiKey?: ApiKeyListInstance;
- /** getApiKeys - { Twilio.Iam.V1.GetApiKeysListInstance } resource */
- protected _getApiKeys?: GetApiKeysListInstance;
- /** newApiKey - { Twilio.Iam.V1.NewApiKeyListInstance } resource */
- protected _newApiKey?: NewApiKeyListInstance;
- /** token - { Twilio.Iam.V1.TokenListInstance } resource */
- protected _token?: TokenListInstance;
-
- /** Getter for apiKey resource */
- get apiKey(): ApiKeyListInstance {
- this._apiKey = this._apiKey || ApiKeyListInstance(this);
- return this._apiKey;
- }
-
- /** Getter for getApiKeys resource */
- get getApiKeys(): GetApiKeysListInstance {
- this._getApiKeys = this._getApiKeys || GetApiKeysListInstance(this);
- return this._getApiKeys;
- }
-
- /** Getter for newApiKey resource */
- get newApiKey(): NewApiKeyListInstance {
- this._newApiKey = this._newApiKey || NewApiKeyListInstance(this);
- return this._newApiKey;
- }
-
- /** Getter for token resource */
- get token(): TokenListInstance {
- this._token = this._token || TokenListInstance(this);
- return this._token;
- }
-}
diff --git a/examples/node/src/rest/iam/v1/apiKey.ts b/examples/node/src/rest/iam/v1/apiKey.ts
deleted file mode 100644
index 38c1c1249..000000000
--- a/examples/node/src/rest/iam/v1/apiKey.ts
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-import { inspect, InspectOptions } from "util";
-import V1 from "../V1";
-const deserialize = require("../../../base/deserialize");
-const serialize = require("../../../base/serialize");
-import { isValidPathParam } from "../../../base/utility";
-
-/**
- * Options to pass to update a ApiKeyInstance
- */
-export interface ApiKeyContextUpdateOptions {
- /** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
- friendlyName?: string;
- /** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
- policy?: any;
-}
-
-export interface ApiKeyContext {
- /**
- * Remove a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed boolean
- */
- remove(
- callback?: (error: Error | null, item?: boolean) => any,
- ): Promise;
-
- /**
- * Fetch a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- fetch(
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise;
-
- /**
- * Update a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- update(
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise;
- /**
- * Update a ApiKeyInstance
- *
- * @param params - Parameter for request
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- update(
- params: ApiKeyContextUpdateOptions,
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise;
-
- /**
- * Provide a user-friendly representation
- */
- toJSON(): any;
- [inspect.custom](_depth: any, options: InspectOptions): any;
-}
-
-export interface ApiKeyContextSolution {
- sid: string;
-}
-
-export class ApiKeyContextImpl implements ApiKeyContext {
- protected _solution: ApiKeyContextSolution;
- protected _uri: string;
-
- constructor(
- protected _version: V1,
- sid: string,
- ) {
- if (!isValidPathParam(sid)) {
- throw new Error("Parameter 'sid' is not valid.");
- }
-
- this._solution = { sid };
- this._uri = `/Keys/${sid}`;
- }
-
- remove(
- callback?: (error: Error | null, item?: boolean) => any,
- ): Promise {
- const headers: any = {};
-
- const instance = this;
- let operationVersion = instance._version,
- operationPromise = operationVersion.remove({
- uri: instance._uri,
- method: "delete",
- headers,
- });
-
- operationPromise = instance._version.setPromiseCallback(
- operationPromise,
- callback,
- );
- return operationPromise;
- }
-
- fetch(
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise {
- const headers: any = {};
- headers["Accept"] = "application/json";
-
- const instance = this;
- let operationVersion = instance._version,
- operationPromise = operationVersion.fetch({
- uri: instance._uri,
- method: "get",
- headers,
- });
-
- operationPromise = operationPromise.then(
- (payload) =>
- new ApiKeyInstance(operationVersion, payload, instance._solution.sid),
- );
-
- operationPromise = instance._version.setPromiseCallback(
- operationPromise,
- callback,
- );
- return operationPromise;
- }
-
- update(
- params?:
- | ApiKeyContextUpdateOptions
- | ((error: Error | null, item?: ApiKeyInstance) => any),
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise {
- if (params instanceof Function) {
- callback = params;
- params = {};
- } else {
- params = params || {};
- }
-
- let data: any = {};
-
- if (params["friendlyName"] !== undefined)
- data["FriendlyName"] = params["friendlyName"];
- if (params["policy"] !== undefined)
- data["Policy"] = serialize.object(params["policy"]);
-
- const headers: any = {};
- headers["Content-Type"] = "application/x-www-form-urlencoded";
- headers["Accept"] = "application/json";
-
- const instance = this;
- let operationVersion = instance._version,
- operationPromise = operationVersion.update({
- uri: instance._uri,
- method: "post",
- data,
- headers,
- });
-
- operationPromise = operationPromise.then(
- (payload) =>
- new ApiKeyInstance(operationVersion, payload, instance._solution.sid),
- );
-
- operationPromise = instance._version.setPromiseCallback(
- operationPromise,
- callback,
- );
- return operationPromise;
- }
-
- /**
- * Provide a user-friendly representation
- *
- * @returns Object
- */
- toJSON() {
- return this._solution;
- }
-
- [inspect.custom](_depth: any, options: InspectOptions) {
- return inspect(this.toJSON(), options);
- }
-}
-
-interface ApiKeyPayload extends ApiKeyResource {}
-
-interface ApiKeyResource {
- sid: string;
- friendly_name: string;
- date_created: Date;
- date_updated: Date;
- policy: Record;
-}
-
-export class ApiKeyInstance {
- protected _solution: ApiKeyContextSolution;
- protected _context?: ApiKeyContext;
-
- constructor(
- protected _version: V1,
- payload: ApiKeyResource,
- sid?: string,
- ) {
- this.sid = payload.sid;
- this.friendlyName = payload.friendly_name;
- this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
- this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
- this.policy = payload.policy;
-
- this._solution = { sid: sid || this.sid };
- }
-
- /**
- * The unique string that we created to identify the Key resource.
- */
- sid: string;
- /**
- * The string that you assigned to describe the resource.
- */
- friendlyName: string;
- /**
- * The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateCreated: Date;
- /**
- * The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateUpdated: Date;
- /**
- * The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- */
- policy: Record;
-
- private get _proxy(): ApiKeyContext {
- this._context =
- this._context || new ApiKeyContextImpl(this._version, this._solution.sid);
- return this._context;
- }
-
- /**
- * Remove a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed boolean
- */
- remove(
- callback?: (error: Error | null, item?: boolean) => any,
- ): Promise {
- return this._proxy.remove(callback);
- }
-
- /**
- * Fetch a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- fetch(
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise {
- return this._proxy.fetch(callback);
- }
-
- /**
- * Update a ApiKeyInstance
- *
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- update(
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise;
- /**
- * Update a ApiKeyInstance
- *
- * @param params - Parameter for request
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed ApiKeyInstance
- */
- update(
- params: ApiKeyContextUpdateOptions,
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise;
-
- update(
- params?: any,
- callback?: (error: Error | null, item?: ApiKeyInstance) => any,
- ): Promise {
- return this._proxy.update(params, callback);
- }
-
- /**
- * Provide a user-friendly representation
- *
- * @returns Object
- */
- toJSON() {
- return {
- sid: this.sid,
- friendlyName: this.friendlyName,
- dateCreated: this.dateCreated,
- dateUpdated: this.dateUpdated,
- policy: this.policy,
- };
- }
-
- [inspect.custom](_depth: any, options: InspectOptions) {
- return inspect(this.toJSON(), options);
- }
-}
-
-export interface ApiKeySolution {}
-
-export interface ApiKeyListInstance {
- _version: V1;
- _solution: ApiKeySolution;
- _uri: string;
-
- (sid: string): ApiKeyContext;
- get(sid: string): ApiKeyContext;
-
- /**
- * Provide a user-friendly representation
- */
- toJSON(): any;
- [inspect.custom](_depth: any, options: InspectOptions): any;
-}
-
-export function ApiKeyListInstance(version: V1): ApiKeyListInstance {
- const instance = ((sid) => instance.get(sid)) as ApiKeyListInstance;
-
- instance.get = function get(sid): ApiKeyContext {
- return new ApiKeyContextImpl(version, sid);
- };
-
- instance._version = version;
- instance._solution = {};
- instance._uri = ``;
-
- instance.toJSON = function toJSON() {
- return instance._solution;
- };
-
- instance[inspect.custom] = function inspectImpl(
- _depth: any,
- options: InspectOptions,
- ) {
- return inspect(instance.toJSON(), options);
- };
-
- return instance;
-}
diff --git a/examples/node/src/rest/iam/v1/getApiKeys.ts b/examples/node/src/rest/iam/v1/getApiKeys.ts
deleted file mode 100644
index de094c69a..000000000
--- a/examples/node/src/rest/iam/v1/getApiKeys.ts
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-import { inspect, InspectOptions } from "util";
-import Page, { TwilioResponsePayload } from "../../../base/Page";
-import Response from "../../../http/response";
-import V1 from "../V1";
-const deserialize = require("../../../base/deserialize");
-const serialize = require("../../../base/serialize");
-import { isValidPathParam } from "../../../base/utility";
-
-/**
- * Options to pass to each
- */
-export interface GetApiKeysListInstanceEachOptions {
- /** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
- accountSid: string;
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
- pageSize?: number;
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
- callback?: (item: GetApiKeysInstance, done: (err?: Error) => void) => void;
- /** Function to be called upon completion of streaming */
- done?: Function;
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
- limit?: number;
-}
-
-/**
- * Options to pass to list
- */
-export interface GetApiKeysListInstanceOptions {
- /** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
- accountSid: string;
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
- pageSize?: number;
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
- limit?: number;
-}
-
-/**
- * Options to pass to page
- */
-export interface GetApiKeysListInstancePageOptions {
- /** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
- accountSid: string;
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
- pageSize?: number;
- /** Page Number, this value is simply for client state */
- pageNumber?: number;
- /** PageToken provided by the API */
- pageToken?: string;
-}
-
-export interface GetApiKeysSolution {}
-
-export interface GetApiKeysListInstance {
- _version: V1;
- _solution: GetApiKeysSolution;
- _uri: string;
-
- /**
- * Streams GetApiKeysInstance records from the API.
- *
- * This operation lazily loads records as efficiently as possible until the limit
- * is reached.
- *
- * The results are passed into the callback function, so this operation is memory
- * efficient.
- *
- * If a function is passed as the first argument, it will be used as the callback
- * function.
- *
- * @param { GetApiKeysListInstanceEachOptions } [params] - Options for request
- * @param { function } [callback] - Function to process each record
- */
-
- each(
- params: GetApiKeysListInstanceEachOptions,
- callback?: (item: GetApiKeysInstance, done: (err?: Error) => void) => void,
- ): void;
- /**
- * Retrieve a single target page of GetApiKeysInstance records from the API.
- *
- * The request is executed immediately.
- *
- * @param { string } [targetUrl] - API-generated URL for the requested results page
- * @param { function } [callback] - Callback to handle list of records
- */
- getPage(
- targetUrl: string,
- callback?: (error: Error | null, items: GetApiKeysPage) => any,
- ): Promise;
- /**
- * Lists GetApiKeysInstance records from the API as a list.
- *
- * If a function is passed as the first argument, it will be used as the callback
- * function.
- *
- * @param { GetApiKeysListInstanceOptions } [params] - Options for request
- * @param { function } [callback] - Callback to handle list of records
- */
-
- list(
- params: GetApiKeysListInstanceOptions,
- callback?: (error: Error | null, items: GetApiKeysInstance[]) => any,
- ): Promise;
- /**
- * Retrieve a single page of GetApiKeysInstance records from the API.
- *
- * The request is executed immediately.
- *
- * If a function is passed as the first argument, it will be used as the callback
- * function.
- *
- * @param { GetApiKeysListInstancePageOptions } [params] - Options for request
- * @param { function } [callback] - Callback to handle list of records
- */
-
- page(
- params: GetApiKeysListInstancePageOptions,
- callback?: (error: Error | null, items: GetApiKeysPage) => any,
- ): Promise;
-
- /**
- * Provide a user-friendly representation
- */
- toJSON(): any;
- [inspect.custom](_depth: any, options: InspectOptions): any;
-}
-
-export function GetApiKeysListInstance(version: V1): GetApiKeysListInstance {
- const instance = {} as GetApiKeysListInstance;
-
- instance._version = version;
- instance._solution = {};
- instance._uri = `/Keys`;
-
- instance.page = function page(
- params: GetApiKeysListInstancePageOptions,
- callback?: (error: Error | null, items: GetApiKeysPage) => any,
- ): Promise {
- if (params === null || params === undefined) {
- throw new Error('Required parameter "params" missing.');
- }
-
- if (params["accountSid"] === null || params["accountSid"] === undefined) {
- throw new Error("Required parameter \"params['accountSid']\" missing.");
- }
-
- let data: any = {};
-
- data["AccountSid"] = params["accountSid"];
- if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"];
-
- if (params.pageNumber !== undefined) data["Page"] = params.pageNumber;
- if (params.pageToken !== undefined) data["PageToken"] = params.pageToken;
-
- const headers: any = {};
- headers["Accept"] = "application/json";
-
- let operationVersion = version,
- operationPromise = operationVersion.page({
- uri: instance._uri,
- method: "get",
- params: data,
- headers,
- });
-
- operationPromise = operationPromise.then(
- (payload) =>
- new GetApiKeysPage(operationVersion, payload, instance._solution),
- );
-
- operationPromise = instance._version.setPromiseCallback(
- operationPromise,
- callback,
- );
- return operationPromise;
- };
- instance.each = instance._version.each;
- instance.list = instance._version.list;
-
- instance.getPage = function getPage(
- targetUrl: string,
- callback?: (error: Error | null, items: GetApiKeysPage) => any,
- ): Promise {
- const operationPromise = instance._version._domain.twilio.request({
- method: "get",
- uri: targetUrl,
- });
-
- let pagePromise = operationPromise.then(
- (payload) =>
- new GetApiKeysPage(instance._version, payload, instance._solution),
- );
- pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
- return pagePromise;
- };
-
- instance.toJSON = function toJSON() {
- return instance._solution;
- };
-
- instance[inspect.custom] = function inspectImpl(
- _depth: any,
- options: InspectOptions,
- ) {
- return inspect(instance.toJSON(), options);
- };
-
- return instance;
-}
-
-interface GetApiKeysPayload extends TwilioResponsePayload {
- keys: GetApiKeysResource[];
-}
-
-interface GetApiKeysResource {
- sid: string;
- friendly_name: string;
- date_created: Date;
- date_updated: Date;
-}
-
-export class GetApiKeysInstance {
- constructor(
- protected _version: V1,
- payload: GetApiKeysResource,
- ) {
- this.sid = payload.sid;
- this.friendlyName = payload.friendly_name;
- this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
- this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
- }
-
- /**
- * The unique string that we created to identify the Key resource.
- */
- sid: string;
- /**
- * The string that you assigned to describe the resource.
- */
- friendlyName: string;
- /**
- * The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateCreated: Date;
- /**
- * The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateUpdated: Date;
-
- /**
- * Provide a user-friendly representation
- *
- * @returns Object
- */
- toJSON() {
- return {
- sid: this.sid,
- friendlyName: this.friendlyName,
- dateCreated: this.dateCreated,
- dateUpdated: this.dateUpdated,
- };
- }
-
- [inspect.custom](_depth: any, options: InspectOptions) {
- return inspect(this.toJSON(), options);
- }
-}
-
-export class GetApiKeysPage extends Page<
- V1,
- GetApiKeysPayload,
- GetApiKeysResource,
- GetApiKeysInstance
-> {
- /**
- * Initialize the GetApiKeysPage
- *
- * @param version - Version of the resource
- * @param response - Response from the API
- * @param solution - Path solution
- */
- constructor(
- version: V1,
- response: Response,
- solution: GetApiKeysSolution,
- ) {
- super(version, response, solution);
- }
-
- /**
- * Build an instance of GetApiKeysInstance
- *
- * @param payload - Payload response from the API
- */
- getInstance(payload: GetApiKeysResource): GetApiKeysInstance {
- return new GetApiKeysInstance(this._version, payload);
- }
-
- [inspect.custom](depth: any, options: InspectOptions) {
- return inspect(this.toJSON(), options);
- }
-}
diff --git a/examples/node/src/rest/iam/v1/newApiKey.ts b/examples/node/src/rest/iam/v1/newApiKey.ts
deleted file mode 100644
index 6d67542d4..000000000
--- a/examples/node/src/rest/iam/v1/newApiKey.ts
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Iam
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-import { inspect, InspectOptions } from "util";
-import V1 from "../V1";
-const deserialize = require("../../../base/deserialize");
-const serialize = require("../../../base/serialize");
-import { isValidPathParam } from "../../../base/utility";
-
-export type NewApiKeyKeytype = "restricted";
-
-/**
- * Options to pass to create a NewApiKeyInstance
- */
-export interface NewApiKeyListInstanceCreateOptions {
- /** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
- accountSid: string;
- /** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
- friendlyName?: string;
- /** */
- keyType?: NewApiKeyKeytype;
- /** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
- policy?: any;
-}
-
-export interface NewApiKeySolution {}
-
-export interface NewApiKeyListInstance {
- _version: V1;
- _solution: NewApiKeySolution;
- _uri: string;
-
- /**
- * Create a NewApiKeyInstance
- *
- * @param params - Parameter for request
- * @param callback - Callback to handle processed record
- *
- * @returns Resolves to processed NewApiKeyInstance
- */
- create(
- params: NewApiKeyListInstanceCreateOptions,
- callback?: (error: Error | null, item?: NewApiKeyInstance) => any,
- ): Promise;
-
- /**
- * Provide a user-friendly representation
- */
- toJSON(): any;
- [inspect.custom](_depth: any, options: InspectOptions): any;
-}
-
-export function NewApiKeyListInstance(version: V1): NewApiKeyListInstance {
- const instance = {} as NewApiKeyListInstance;
-
- instance._version = version;
- instance._solution = {};
- instance._uri = `/Keys`;
-
- instance.create = function create(
- params: NewApiKeyListInstanceCreateOptions,
- callback?: (error: Error | null, items: NewApiKeyInstance) => any,
- ): Promise {
- if (params === null || params === undefined) {
- throw new Error('Required parameter "params" missing.');
- }
-
- if (params["accountSid"] === null || params["accountSid"] === undefined) {
- throw new Error("Required parameter \"params['accountSid']\" missing.");
- }
-
- let data: any = {};
-
- data["AccountSid"] = params["accountSid"];
- if (params["friendlyName"] !== undefined)
- data["FriendlyName"] = params["friendlyName"];
- if (params["keyType"] !== undefined) data["KeyType"] = params["keyType"];
- if (params["policy"] !== undefined)
- data["Policy"] = serialize.object(params["policy"]);
-
- const headers: any = {};
- headers["Content-Type"] = "application/x-www-form-urlencoded";
- headers["Accept"] = "application/json";
-
- let operationVersion = version,
- operationPromise = operationVersion.create({
- uri: instance._uri,
- method: "post",
- data,
- headers,
- });
-
- operationPromise = operationPromise.then(
- (payload) => new NewApiKeyInstance(operationVersion, payload),
- );
-
- operationPromise = instance._version.setPromiseCallback(
- operationPromise,
- callback,
- );
- return operationPromise;
- };
-
- instance.toJSON = function toJSON() {
- return instance._solution;
- };
-
- instance[inspect.custom] = function inspectImpl(
- _depth: any,
- options: InspectOptions,
- ) {
- return inspect(instance.toJSON(), options);
- };
-
- return instance;
-}
-
-interface NewApiKeyPayload extends NewApiKeyResource {}
-
-interface NewApiKeyResource {
- sid: string;
- friendly_name: string;
- date_created: Date;
- date_updated: Date;
- secret: string;
- policy: Record;
-}
-
-export class NewApiKeyInstance {
- constructor(
- protected _version: V1,
- payload: NewApiKeyResource,
- ) {
- this.sid = payload.sid;
- this.friendlyName = payload.friendly_name;
- this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
- this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
- this.secret = payload.secret;
- this.policy = payload.policy;
- }
-
- /**
- * The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
- */
- sid: string;
- /**
- * The string that you assigned to describe the resource.
- */
- friendlyName: string;
- /**
- * The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateCreated: Date;
- /**
- * The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- */
- dateUpdated: Date;
- /**
- * The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
- */
- secret: string;
- /**
- * Collection of allow assertions.
- */
- policy: Record;
-
- /**
- * Provide a user-friendly representation
- *
- * @returns Object
- */
- toJSON() {
- return {
- sid: this.sid,
- friendlyName: this.friendlyName,
- dateCreated: this.dateCreated,
- dateUpdated: this.dateUpdated,
- secret: this.secret,
- policy: this.policy,
- };
- }
-
- [inspect.custom](_depth: any, options: InspectOptions) {
- return inspect(this.toJSON(), options);
- }
-}
diff --git a/examples/node/src/rest/oauth/V2.ts b/examples/node/src/rest/oauth/V2.ts
new file mode 100644
index 000000000..198a72674
--- /dev/null
+++ b/examples/node/src/rest/oauth/V2.ts
@@ -0,0 +1,37 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * User OAuth API
+ * User OAuth API
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import OauthBase from "../OauthBase";
+import Version from "../../base/Version";
+import { TokenListInstance } from "./v2/token";
+
+export default class V2 extends Version {
+ /**
+ * Initialize the V2 version of Oauth
+ *
+ * @param domain - The Twilio (Twilio.Oauth) domain
+ */
+ constructor(domain: OauthBase) {
+ super(domain, "v2");
+ }
+
+ /** token - { Twilio.Oauth.V2.TokenListInstance } resource */
+ protected _token?: TokenListInstance;
+
+ /** Getter for token resource */
+ get token(): TokenListInstance {
+ this._token = this._token || TokenListInstance(this);
+ return this._token;
+ }
+}
diff --git a/examples/node/src/rest/iam/v1/token.ts b/examples/node/src/rest/oauth/v2/token.ts
similarity index 84%
rename from examples/node/src/rest/iam/v1/token.ts
rename to examples/node/src/rest/oauth/v2/token.ts
index 083b4fe98..165948ae0 100644
--- a/examples/node/src/rest/iam/v1/token.ts
+++ b/examples/node/src/rest/oauth/v2/token.ts
@@ -4,8 +4,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -13,7 +13,7 @@
*/
import { inspect, InspectOptions } from "util";
-import V1 from "../V1";
+import V2 from "../V2";
const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";
@@ -23,9 +23,9 @@ import { isValidPathParam } from "../../../base/utility";
*/
export interface TokenListInstanceCreateOptions {
/** Grant type is a credential representing resource owner\\\'s authorization which can be used by client to obtain access token. */
- grantType: string;
+ grantType?: string;
/** A 34 character string that uniquely identifies this OAuth App. */
- clientId: string;
+ clientId?: string;
/** The credential for confidential OAuth App. */
clientSecret?: string;
/** JWT token related to the authorization code grant type. */
@@ -43,10 +43,20 @@ export interface TokenListInstanceCreateOptions {
export interface TokenSolution {}
export interface TokenListInstance {
- _version: V1;
+ _version: V2;
_solution: TokenSolution;
_uri: string;
+ /**
+ * Create a TokenInstance
+ *
+ * @param callback - Callback to handle processed record
+ *
+ * @returns Resolves to processed TokenInstance
+ */
+ create(
+ callback?: (error: Error | null, item?: TokenInstance) => any,
+ ): Promise;
/**
* Create a TokenInstance
*
@@ -67,7 +77,7 @@ export interface TokenListInstance {
[inspect.custom](_depth: any, options: InspectOptions): any;
}
-export function TokenListInstance(version: V1): TokenListInstance {
+export function TokenListInstance(version: V2): TokenListInstance {
const instance = {} as TokenListInstance;
instance._version = version;
@@ -75,26 +85,24 @@ export function TokenListInstance(version: V1): TokenListInstance {
instance._uri = `/token`;
instance.create = function create(
- params: TokenListInstanceCreateOptions,
+ params?:
+ | TokenListInstanceCreateOptions
+ | ((error: Error | null, items: TokenInstance) => any),
callback?: (error: Error | null, items: TokenInstance) => any,
): Promise {
- if (params === null || params === undefined) {
- throw new Error('Required parameter "params" missing.');
- }
-
- if (params["grantType"] === null || params["grantType"] === undefined) {
- throw new Error("Required parameter \"params['grantType']\" missing.");
- }
-
- if (params["clientId"] === null || params["clientId"] === undefined) {
- throw new Error("Required parameter \"params['clientId']\" missing.");
+ if (params instanceof Function) {
+ callback = params;
+ params = {};
+ } else {
+ params = params || {};
}
let data: any = {};
- data["grant_type"] = params["grantType"];
-
- data["client_id"] = params["clientId"];
+ if (params["grantType"] !== undefined)
+ data["grant_type"] = params["grantType"];
+ if (params["clientId"] !== undefined)
+ data["client_id"] = params["clientId"];
if (params["clientSecret"] !== undefined)
data["client_secret"] = params["clientSecret"];
if (params["code"] !== undefined) data["code"] = params["code"];
@@ -154,7 +162,7 @@ interface TokenResource {
export class TokenInstance {
constructor(
- protected _version: V1,
+ protected _version: V2,
payload: TokenResource,
) {
this.accessToken = payload.access_token;
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyContext.php b/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyContext.php
deleted file mode 100644
index f58cabc2f..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyContext.php
+++ /dev/null
@@ -1,134 +0,0 @@
-solution = [
- 'sid' =>
- $sid,
- ];
-
- $this->uri = '/Keys/' . \rawurlencode($sid)
- .'';
- }
-
- /**
- * Delete the ApiKeyInstance
- *
- * @return bool True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete(): bool
- {
-
- $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
- return $this->version->delete('DELETE', $this->uri, [], [], $headers);
- }
-
-
- /**
- * Fetch the ApiKeyInstance
- *
- * @return ApiKeyInstance Fetched ApiKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch(): ApiKeyInstance
- {
-
- $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
- $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
-
- return new ApiKeyInstance(
- $this->version,
- $payload,
- $this->solution['sid']
- );
- }
-
-
- /**
- * Update the ApiKeyInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ApiKeyInstance Updated ApiKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update(array $options = []): ApiKeyInstance
- {
-
- $options = new Values($options);
-
- $data = Values::of([
- 'FriendlyName' =>
- $options['friendlyName'],
- 'Policy' =>
- Serialize::jsonObject($options['policy']),
- ]);
-
- $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
- $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
-
- return new ApiKeyInstance(
- $this->version,
- $payload,
- $this->solution['sid']
- );
- }
-
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- $context = [];
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Iam.V1.ApiKeyContext ' . \implode(' ', $context) . ']';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyInstance.php b/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyInstance.php
deleted file mode 100644
index 2c69f5402..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyInstance.php
+++ /dev/null
@@ -1,155 +0,0 @@
-properties = [
- 'sid' => Values::array_get($payload, 'sid'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'policy' => Values::array_get($payload, 'policy'),
- ];
-
- $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return ApiKeyContext Context for this ApiKeyInstance
- */
- protected function proxy(): ApiKeyContext
- {
- if (!$this->context) {
- $this->context = new ApiKeyContext(
- $this->version,
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Delete the ApiKeyInstance
- *
- * @return bool True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete(): bool
- {
-
- return $this->proxy()->delete();
- }
-
- /**
- * Fetch the ApiKeyInstance
- *
- * @return ApiKeyInstance Fetched ApiKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch(): ApiKeyInstance
- {
-
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ApiKeyInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ApiKeyInstance Updated ApiKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update(array $options = []): ApiKeyInstance
- {
-
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get(string $name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- $context = [];
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Iam.V1.ApiKeyInstance ' . \implode(' ', $context) . ']';
- }
-}
-
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyList.php b/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyList.php
deleted file mode 100644
index e0d97a4a8..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyList.php
+++ /dev/null
@@ -1,74 +0,0 @@
-solution = [
- ];
- }
-
- /**
- * Constructs a ApiKeyContext
- *
- * @param string $sid The Twilio-provided string that uniquely identifies the Key resource to delete.
- */
- public function getContext(
- string $sid
-
- ): ApiKeyContext
- {
- return new ApiKeyContext(
- $this->version,
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.ApiKeyList]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyOptions.php b/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyOptions.php
deleted file mode 100644
index fdf5fa627..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyOptions.php
+++ /dev/null
@@ -1,107 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['policy'] = $policy;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName(string $friendlyName): self
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- *
- * @param array $policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- * @return $this Fluent Builder
- */
- public function setPolicy(array $policy): self
- {
- $this->options['policy'] = $policy;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- $options = \http_build_query(Values::of($this->options), '', ' ');
- return '[Twilio.Iam.V1.UpdateApiKeyOptions ' . $options . ']';
- }
-}
-
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyPage.php b/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyPage.php
deleted file mode 100644
index a0be1c4bd..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/ApiKeyPage.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = $solution;
- }
-
- /**
- * @param array $payload Payload response from the API
- * @return ApiKeyInstance \Twilio\Rest\Iam\V1\ApiKeyInstance
- */
- public function buildInstance(array $payload): ApiKeyInstance
- {
- return new ApiKeyInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.ApiKeyPage]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysInstance.php b/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysInstance.php
deleted file mode 100644
index 524841cc6..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysInstance.php
+++ /dev/null
@@ -1,93 +0,0 @@
-properties = [
- 'sid' => Values::array_get($payload, 'sid'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- ];
-
- $this->solution = [];
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get(string $name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.GetApiKeysInstance]';
- }
-}
-
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysList.php b/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysList.php
deleted file mode 100644
index 636894aab..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysList.php
+++ /dev/null
@@ -1,159 +0,0 @@
-solution = [
- ];
-
- $this->uri = '/Keys';
- }
-
- /**
- * Reads GetApiKeysInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return GetApiKeysInstance[] Array of results
- */
- public function read(array $options = [], ?int $limit = null, $pageSize = null): array
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Streams GetApiKeysInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return Stream stream of results
- */
- public function stream(array $options = [], ?int $limit = null, $pageSize = null): Stream
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Retrieve a single page of GetApiKeysInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return GetApiKeysPage Page of GetApiKeysInstance
- */
- public function page(
- array $options = [],
- $pageSize = Values::NONE,
- string $pageToken = Values::NONE,
- $pageNumber = Values::NONE
- ): GetApiKeysPage
- {
- $options = new Values($options);
-
- $params = Values::of([
- 'AccountSid' =>
- $options['accountSid'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ]);
-
- $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json']);
- $response = $this->version->page('GET', $this->uri, $params, [], $headers);
-
- return new GetApiKeysPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of GetApiKeysInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return GetApiKeysPage Page of GetApiKeysInstance
- */
- public function getPage(string $targetUrl): GetApiKeysPage
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new GetApiKeysPage($this->version, $response, $this->solution);
- }
-
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.GetApiKeysList]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysPage.php b/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysPage.php
deleted file mode 100644
index c51911a2f..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/GetApiKeysPage.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = $solution;
- }
-
- /**
- * @param array $payload Payload response from the API
- * @return GetApiKeysInstance \Twilio\Rest\Iam\V1\GetApiKeysInstance
- */
- public function buildInstance(array $payload): GetApiKeysInstance
- {
- return new GetApiKeysInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.GetApiKeysPage]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyInstance.php b/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyInstance.php
deleted file mode 100644
index 84b2ad53f..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyInstance.php
+++ /dev/null
@@ -1,97 +0,0 @@
-properties = [
- 'sid' => Values::array_get($payload, 'sid'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'secret' => Values::array_get($payload, 'secret'),
- 'policy' => Values::array_get($payload, 'policy'),
- ];
-
- $this->solution = [];
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get(string $name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.NewApiKeyInstance]';
- }
-}
-
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyList.php b/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyList.php
deleted file mode 100644
index ce3926e2d..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyList.php
+++ /dev/null
@@ -1,94 +0,0 @@
-solution = [
- ];
-
- $this->uri = '/Keys';
- }
-
- /**
- * Create the NewApiKeyInstance
- *
- * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- * @param array|Options $options Optional Arguments
- * @return NewApiKeyInstance Created NewApiKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create(string $accountSid, array $options = []): NewApiKeyInstance
- {
-
- $options = new Values($options);
-
- $data = Values::of([
- 'AccountSid' =>
- $accountSid,
- 'FriendlyName' =>
- $options['friendlyName'],
- 'KeyType' =>
- $options['keyType'],
- 'Policy' =>
- Serialize::jsonObject($options['policy']),
- ]);
-
- $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
- $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
-
- return new NewApiKeyInstance(
- $this->version,
- $payload
- );
- }
-
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.NewApiKeyList]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.php b/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.php
deleted file mode 100644
index 424fc9cf0..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyOptions.php
+++ /dev/null
@@ -1,119 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['keyType'] = $keyType;
- $this->options['policy'] = $policy;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName(string $friendlyName): self
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * @param string $keyType
- * @return $this Fluent Builder
- */
- public function setKeyType(string $keyType): self
- {
- $this->options['keyType'] = $keyType;
- return $this;
- }
-
- /**
- * The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- *
- * @param array $policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- * @return $this Fluent Builder
- */
- public function setPolicy(array $policy): self
- {
- $this->options['policy'] = $policy;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- $options = \http_build_query(Values::of($this->options), '', ' ');
- return '[Twilio.Iam.V1.CreateNewApiKeyOptions ' . $options . ']';
- }
-}
-
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyPage.php b/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyPage.php
deleted file mode 100644
index 2bfeefe95..000000000
--- a/examples/php/src/Twilio/Rest/Iam/V1/NewApiKeyPage.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = $solution;
- }
-
- /**
- * @param array $payload Payload response from the API
- * @return NewApiKeyInstance \Twilio\Rest\Iam\V1\NewApiKeyInstance
- */
- public function buildInstance(array $payload): NewApiKeyInstance
- {
- return new NewApiKeyInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString(): string
- {
- return '[Twilio.Iam.V1.NewApiKeyPage]';
- }
-}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1.php b/examples/php/src/Twilio/Rest/Oauth/V2.php
similarity index 65%
rename from examples/php/src/Twilio/Rest/Iam/V1.php
rename to examples/php/src/Twilio/Rest/Oauth/V2.php
index f9b68f834..f2747b501 100644
--- a/examples/php/src/Twilio/Rest/Iam/V1.php
+++ b/examples/php/src/Twilio/Rest/Oauth/V2.php
@@ -5,72 +5,38 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-namespace Twilio\Rest\Iam;
+namespace Twilio\Rest\Oauth;
use Twilio\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceContext;
-use Twilio\Rest\Iam\V1\ApiKeyList;
-use Twilio\Rest\Iam\V1\GetApiKeysList;
-use Twilio\Rest\Iam\V1\NewApiKeyList;
-use Twilio\Rest\Iam\V1\TokenList;
+use Twilio\Rest\Oauth\V2\TokenList;
use Twilio\Version;
/**
- * @property ApiKeyList $apiKey
- * @property GetApiKeysList $getApiKeys
- * @property NewApiKeyList $newApiKey
* @property TokenList $token
- * @method \Twilio\Rest\Iam\V1\ApiKeyContext apiKey(string $sid)
*/
-class V1 extends Version
+class V2 extends Version
{
- protected $_apiKey;
- protected $_getApiKeys;
- protected $_newApiKey;
protected $_token;
/**
- * Construct the V1 version of Iam
+ * Construct the V2 version of Oauth
*
* @param Domain $domain Domain that contains the version
*/
public function __construct(Domain $domain)
{
parent::__construct($domain);
- $this->version = 'v1';
- }
-
- protected function getApiKey(): ApiKeyList
- {
- if (!$this->_apiKey) {
- $this->_apiKey = new ApiKeyList($this);
- }
- return $this->_apiKey;
- }
-
- protected function getGetApiKeys(): GetApiKeysList
- {
- if (!$this->_getApiKeys) {
- $this->_getApiKeys = new GetApiKeysList($this);
- }
- return $this->_getApiKeys;
- }
-
- protected function getNewApiKey(): NewApiKeyList
- {
- if (!$this->_newApiKey) {
- $this->_newApiKey = new NewApiKeyList($this);
- }
- return $this->_newApiKey;
+ $this->version = 'v2';
}
protected function getToken(): TokenList
@@ -123,6 +89,6 @@ public function __call(string $name, array $arguments): InstanceContext
*/
public function __toString(): string
{
- return '[Twilio.Iam.V1]';
+ return '[Twilio.Oauth.V2]';
}
}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/TokenInstance.php b/examples/php/src/Twilio/Rest/Oauth/V2/TokenInstance.php
similarity index 94%
rename from examples/php/src/Twilio/Rest/Iam/V1/TokenInstance.php
rename to examples/php/src/Twilio/Rest/Oauth/V2/TokenInstance.php
index d6ad9b832..3e436bf0c 100644
--- a/examples/php/src/Twilio/Rest/Iam/V1/TokenInstance.php
+++ b/examples/php/src/Twilio/Rest/Oauth/V2/TokenInstance.php
@@ -6,8 +6,8 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
@@ -15,7 +15,7 @@
*/
-namespace Twilio\Rest\Iam\V1;
+namespace Twilio\Rest\Oauth\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
@@ -89,7 +89,7 @@ public function __get(string $name)
*/
public function __toString(): string
{
- return '[Twilio.Iam.V1.TokenInstance]';
+ return '[Twilio.Oauth.V2.TokenInstance]';
}
}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/TokenList.php b/examples/php/src/Twilio/Rest/Oauth/V2/TokenList.php
similarity index 81%
rename from examples/php/src/Twilio/Rest/Iam/V1/TokenList.php
rename to examples/php/src/Twilio/Rest/Oauth/V2/TokenList.php
index e8eb70d37..97f26be3c 100644
--- a/examples/php/src/Twilio/Rest/Iam/V1/TokenList.php
+++ b/examples/php/src/Twilio/Rest/Oauth/V2/TokenList.php
@@ -6,15 +6,15 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-namespace Twilio\Rest\Iam\V1;
+namespace Twilio\Rest\Oauth\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
@@ -51,22 +51,20 @@ public function __construct(
/**
* Create the TokenInstance
*
- * @param string $grantType Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
- * @param string $clientId A 34 character string that uniquely identifies this OAuth App.
* @param array|Options $options Optional Arguments
* @return TokenInstance Created TokenInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create(string $grantType, string $clientId, array $options = []): TokenInstance
+ public function create(array $options = []): TokenInstance
{
$options = new Values($options);
$data = Values::of([
'grant_type' =>
- $grantType,
+ $options['grantType'],
'client_id' =>
- $clientId,
+ $options['clientId'],
'client_secret' =>
$options['clientSecret'],
'code' =>
@@ -98,6 +96,6 @@ public function create(string $grantType, string $clientId, array $options = [])
*/
public function __toString(): string
{
- return '[Twilio.Iam.V1.TokenList]';
+ return '[Twilio.Oauth.V2.TokenList]';
}
}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/TokenOptions.php b/examples/php/src/Twilio/Rest/Oauth/V2/TokenOptions.php
similarity index 73%
rename from examples/php/src/Twilio/Rest/Iam/V1/TokenOptions.php
rename to examples/php/src/Twilio/Rest/Oauth/V2/TokenOptions.php
index ddc5d8496..e4fba4fd4 100644
--- a/examples/php/src/Twilio/Rest/Iam/V1/TokenOptions.php
+++ b/examples/php/src/Twilio/Rest/Oauth/V2/TokenOptions.php
@@ -5,15 +5,15 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-namespace Twilio\Rest\Iam\V1;
+namespace Twilio\Rest\Oauth\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
@@ -30,6 +30,8 @@
abstract class TokenOptions
{
/**
+ * @param string $grantType Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
+ * @param string $clientId A 34 character string that uniquely identifies this OAuth App.
* @param string $clientSecret The credential for confidential OAuth App.
* @param string $code JWT token related to the authorization code grant type.
* @param string $redirectUri The redirect uri
@@ -40,6 +42,8 @@ abstract class TokenOptions
*/
public static function create(
+ string $grantType = Values::NONE,
+ string $clientId = Values::NONE,
string $clientSecret = Values::NONE,
string $code = Values::NONE,
string $redirectUri = Values::NONE,
@@ -50,6 +54,8 @@ public static function create(
): CreateTokenOptions
{
return new CreateTokenOptions(
+ $grantType,
+ $clientId,
$clientSecret,
$code,
$redirectUri,
@@ -64,6 +70,8 @@ public static function create(
class CreateTokenOptions extends Options
{
/**
+ * @param string $grantType Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
+ * @param string $clientId A 34 character string that uniquely identifies this OAuth App.
* @param string $clientSecret The credential for confidential OAuth App.
* @param string $code JWT token related to the authorization code grant type.
* @param string $redirectUri The redirect uri
@@ -73,6 +81,8 @@ class CreateTokenOptions extends Options
*/
public function __construct(
+ string $grantType = Values::NONE,
+ string $clientId = Values::NONE,
string $clientSecret = Values::NONE,
string $code = Values::NONE,
string $redirectUri = Values::NONE,
@@ -81,6 +91,8 @@ public function __construct(
string $scope = Values::NONE
) {
+ $this->options['grantType'] = $grantType;
+ $this->options['clientId'] = $clientId;
$this->options['clientSecret'] = $clientSecret;
$this->options['code'] = $code;
$this->options['redirectUri'] = $redirectUri;
@@ -89,6 +101,30 @@ public function __construct(
$this->options['scope'] = $scope;
}
+ /**
+ * Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
+ *
+ * @param string $grantType Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
+ * @return $this Fluent Builder
+ */
+ public function setGrantType(string $grantType): self
+ {
+ $this->options['grantType'] = $grantType;
+ return $this;
+ }
+
+ /**
+ * A 34 character string that uniquely identifies this OAuth App.
+ *
+ * @param string $clientId A 34 character string that uniquely identifies this OAuth App.
+ * @return $this Fluent Builder
+ */
+ public function setClientId(string $clientId): self
+ {
+ $this->options['clientId'] = $clientId;
+ return $this;
+ }
+
/**
* The credential for confidential OAuth App.
*
@@ -169,7 +205,7 @@ public function setScope(string $scope): self
public function __toString(): string
{
$options = \http_build_query(Values::of($this->options), '', ' ');
- return '[Twilio.Iam.V1.CreateTokenOptions ' . $options . ']';
+ return '[Twilio.Oauth.V2.CreateTokenOptions ' . $options . ']';
}
}
diff --git a/examples/php/src/Twilio/Rest/Iam/V1/TokenPage.php b/examples/php/src/Twilio/Rest/Oauth/V2/TokenPage.php
similarity index 87%
rename from examples/php/src/Twilio/Rest/Iam/V1/TokenPage.php
rename to examples/php/src/Twilio/Rest/Oauth/V2/TokenPage.php
index 2cc9de75e..d0f488d5a 100644
--- a/examples/php/src/Twilio/Rest/Iam/V1/TokenPage.php
+++ b/examples/php/src/Twilio/Rest/Oauth/V2/TokenPage.php
@@ -5,15 +5,15 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
- * Twilio - Iam
- * This is the public Twilio REST API.
+ * User OAuth API
+ * User OAuth API
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-namespace Twilio\Rest\Iam\V1;
+namespace Twilio\Rest\Oauth\V2;
use Twilio\Http\Response;
use Twilio\Page;
@@ -36,7 +36,7 @@ public function __construct(Version $version, Response $response, array $solutio
/**
* @param array $payload Payload response from the API
- * @return TokenInstance \Twilio\Rest\Iam\V1\TokenInstance
+ * @return TokenInstance \Twilio\Rest\Oauth\V2\TokenInstance
*/
public function buildInstance(array $payload): TokenInstance
{
@@ -50,6 +50,6 @@ public function buildInstance(array $payload): TokenInstance
*/
public function __toString(): string
{
- return '[Twilio.Iam.V1.TokenPage]';
+ return '[Twilio.Oauth.V2.TokenPage]';
}
}
diff --git a/examples/python/twilio/rest/flex_api/v1/credential/aws/history.py b/examples/python/twilio/rest/flex_api/v1/credential/aws/history.py
index 5207f4769..dbf4a08a5 100644
--- a/examples/python/twilio/rest/flex_api/v1/credential/aws/history.py
+++ b/examples/python/twilio/rest/flex_api/v1/credential/aws/history.py
@@ -125,16 +125,16 @@ def fetch(
:returns: The fetched HistoryInstance
"""
- data = values.of({})
+ params = values.of({})
- data.update(serialize.prefixed_collapsible_map(add_ons_data, "AddOns"))
+ params.update(serialize.prefixed_collapsible_map(add_ons_data, "AddOns"))
headers = values.of({})
headers["Accept"] = "application/json"
payload = self._version.fetch(
- method="GET", uri=self._uri, params=data, headers=headers
+ method="GET", uri=self._uri, params=params, headers=headers
)
return HistoryInstance(
@@ -154,16 +154,16 @@ async def fetch_async(
:returns: The fetched HistoryInstance
"""
- data = values.of({})
+ params = values.of({})
- data.update(serialize.prefixed_collapsible_map(add_ons_data, "AddOns"))
+ params.update(serialize.prefixed_collapsible_map(add_ons_data, "AddOns"))
headers = values.of({})
headers["Accept"] = "application/json"
payload = await self._version.fetch_async(
- method="GET", uri=self._uri, params=data, headers=headers
+ method="GET", uri=self._uri, params=params, headers=headers
)
return HistoryInstance(
diff --git a/examples/python/twilio/rest/iam/v1/__init__.py b/examples/python/twilio/rest/iam/v1/__init__.py
deleted file mode 100644
index b2c081a41..000000000
--- a/examples/python/twilio/rest/iam/v1/__init__.py
+++ /dev/null
@@ -1,66 +0,0 @@
-r"""
- This code was generated by
- ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-
- Twilio - Iam
- This is the public Twilio REST API.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- https://openapi-generator.tech
- Do not edit the class manually.
-"""
-
-from typing import Optional
-from twilio.base.version import Version
-from twilio.base.domain import Domain
-from twilio.rest.iam.v1.api_key import ApiKeyList
-from twilio.rest.iam.v1.get_api_keys import GetApiKeysList
-from twilio.rest.iam.v1.new_api_key import NewApiKeyList
-from twilio.rest.iam.v1.token import TokenList
-
-
-class V1(Version):
- def __init__(self, domain: Domain):
- """
- Initialize the V1 version of Iam
-
- :param domain: The Twilio.iam domain
- """
- super().__init__(domain, "v1")
- self._api_key: Optional[ApiKeyList] = None
- self._get_api_keys: Optional[GetApiKeysList] = None
- self._new_api_key: Optional[NewApiKeyList] = None
- self._token: Optional[TokenList] = None
-
- @property
- def api_key(self) -> ApiKeyList:
- if self._api_key is None:
- self._api_key = ApiKeyList(self)
- return self._api_key
-
- @property
- def get_api_keys(self) -> GetApiKeysList:
- if self._get_api_keys is None:
- self._get_api_keys = GetApiKeysList(self)
- return self._get_api_keys
-
- @property
- def new_api_key(self) -> NewApiKeyList:
- if self._new_api_key is None:
- self._new_api_key = NewApiKeyList(self)
- return self._new_api_key
-
- @property
- def token(self) -> TokenList:
- if self._token is None:
- self._token = TokenList(self)
- return self._token
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
- :returns: Machine friendly representation
- """
- return ""
diff --git a/examples/python/twilio/rest/iam/v1/api_key.py b/examples/python/twilio/rest/iam/v1/api_key.py
deleted file mode 100644
index c7f86835b..000000000
--- a/examples/python/twilio/rest/iam/v1/api_key.py
+++ /dev/null
@@ -1,342 +0,0 @@
-r"""
- This code was generated by
- ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-
- Twilio - Iam
- This is the public Twilio REST API.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- https://openapi-generator.tech
- Do not edit the class manually.
-"""
-
-
-from datetime import datetime
-from typing import Any, Dict, Optional, Union
-from twilio.base import deserialize, serialize, values
-from twilio.base.instance_context import InstanceContext
-from twilio.base.instance_resource import InstanceResource
-from twilio.base.list_resource import ListResource
-from twilio.base.version import Version
-
-
-class ApiKeyInstance(InstanceResource):
-
- """
- :ivar sid: The unique string that we created to identify the Key resource.
- :ivar friendly_name: The string that you assigned to describe the resource.
- :ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- :ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- :ivar policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- """
-
- def __init__(
- self, version: Version, payload: Dict[str, Any], sid: Optional[str] = None
- ):
- super().__init__(version)
-
- self.sid: Optional[str] = payload.get("sid")
- self.friendly_name: Optional[str] = payload.get("friendly_name")
- self.date_created: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_created")
- )
- self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_updated")
- )
- self.policy: Optional[Dict[str, object]] = payload.get("policy")
-
- self._solution = {
- "sid": sid or self.sid,
- }
- self._context: Optional[ApiKeyContext] = None
-
- @property
- def _proxy(self) -> "ApiKeyContext":
- """
- Generate an instance context for the instance, the context is capable of
- performing various actions. All instance actions are proxied to the context
-
- :returns: ApiKeyContext for this ApiKeyInstance
- """
- if self._context is None:
- self._context = ApiKeyContext(
- self._version,
- sid=self._solution["sid"],
- )
- return self._context
-
- def delete(self) -> bool:
- """
- Deletes the ApiKeyInstance
-
-
- :returns: True if delete succeeds, False otherwise
- """
- return self._proxy.delete()
-
- async def delete_async(self) -> bool:
- """
- Asynchronous coroutine that deletes the ApiKeyInstance
-
-
- :returns: True if delete succeeds, False otherwise
- """
- return await self._proxy.delete_async()
-
- def fetch(self) -> "ApiKeyInstance":
- """
- Fetch the ApiKeyInstance
-
-
- :returns: The fetched ApiKeyInstance
- """
- return self._proxy.fetch()
-
- async def fetch_async(self) -> "ApiKeyInstance":
- """
- Asynchronous coroutine to fetch the ApiKeyInstance
-
-
- :returns: The fetched ApiKeyInstance
- """
- return await self._proxy.fetch_async()
-
- def update(
- self,
- friendly_name: Union[str, object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> "ApiKeyInstance":
- """
- Update the ApiKeyInstance
-
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The updated ApiKeyInstance
- """
- return self._proxy.update(
- friendly_name=friendly_name,
- policy=policy,
- )
-
- async def update_async(
- self,
- friendly_name: Union[str, object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> "ApiKeyInstance":
- """
- Asynchronous coroutine to update the ApiKeyInstance
-
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The updated ApiKeyInstance
- """
- return await self._proxy.update_async(
- friendly_name=friendly_name,
- policy=policy,
- )
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
- return "".format(context)
-
-
-class ApiKeyContext(InstanceContext):
- def __init__(self, version: Version, sid: str):
- """
- Initialize the ApiKeyContext
-
- :param version: Version that contains the resource
- :param sid: The Twilio-provided string that uniquely identifies the Key resource to update.
- """
- super().__init__(version)
-
- # Path Solution
- self._solution = {
- "sid": sid,
- }
- self._uri = "/Keys/{sid}".format(**self._solution)
-
- def delete(self) -> bool:
- """
- Deletes the ApiKeyInstance
-
-
- :returns: True if delete succeeds, False otherwise
- """
-
- headers = values.of({})
-
- return self._version.delete(method="DELETE", uri=self._uri, headers=headers)
-
- async def delete_async(self) -> bool:
- """
- Asynchronous coroutine that deletes the ApiKeyInstance
-
-
- :returns: True if delete succeeds, False otherwise
- """
-
- headers = values.of({})
-
- return await self._version.delete_async(
- method="DELETE", uri=self._uri, headers=headers
- )
-
- def fetch(self) -> ApiKeyInstance:
- """
- Fetch the ApiKeyInstance
-
-
- :returns: The fetched ApiKeyInstance
- """
-
- headers = values.of({})
-
- headers["Accept"] = "application/json"
-
- payload = self._version.fetch(method="GET", uri=self._uri, headers=headers)
-
- return ApiKeyInstance(
- self._version,
- payload,
- sid=self._solution["sid"],
- )
-
- async def fetch_async(self) -> ApiKeyInstance:
- """
- Asynchronous coroutine to fetch the ApiKeyInstance
-
-
- :returns: The fetched ApiKeyInstance
- """
-
- headers = values.of({})
-
- headers["Accept"] = "application/json"
-
- payload = await self._version.fetch_async(
- method="GET", uri=self._uri, headers=headers
- )
-
- return ApiKeyInstance(
- self._version,
- payload,
- sid=self._solution["sid"],
- )
-
- def update(
- self,
- friendly_name: Union[str, object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> ApiKeyInstance:
- """
- Update the ApiKeyInstance
-
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The updated ApiKeyInstance
- """
-
- data = values.of(
- {
- "FriendlyName": friendly_name,
- "Policy": serialize.object(policy),
- }
- )
- headers = values.of({})
-
- headers["Content-Type"] = "application/x-www-form-urlencoded"
-
- headers["Accept"] = "application/json"
-
- payload = self._version.update(
- method="POST", uri=self._uri, data=data, headers=headers
- )
-
- return ApiKeyInstance(self._version, payload, sid=self._solution["sid"])
-
- async def update_async(
- self,
- friendly_name: Union[str, object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> ApiKeyInstance:
- """
- Asynchronous coroutine to update the ApiKeyInstance
-
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The updated ApiKeyInstance
- """
-
- data = values.of(
- {
- "FriendlyName": friendly_name,
- "Policy": serialize.object(policy),
- }
- )
- headers = values.of({})
-
- headers["Content-Type"] = "application/x-www-form-urlencoded"
-
- headers["Accept"] = "application/json"
-
- payload = await self._version.update_async(
- method="POST", uri=self._uri, data=data, headers=headers
- )
-
- return ApiKeyInstance(self._version, payload, sid=self._solution["sid"])
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
- return "".format(context)
-
-
-class ApiKeyList(ListResource):
- def __init__(self, version: Version):
- """
- Initialize the ApiKeyList
-
- :param version: Version that contains the resource
-
- """
- super().__init__(version)
-
- def get(self, sid: str) -> ApiKeyContext:
- """
- Constructs a ApiKeyContext
-
- :param sid: The Twilio-provided string that uniquely identifies the Key resource to update.
- """
- return ApiKeyContext(self._version, sid=sid)
-
- def __call__(self, sid: str) -> ApiKeyContext:
- """
- Constructs a ApiKeyContext
-
- :param sid: The Twilio-provided string that uniquely identifies the Key resource to update.
- """
- return ApiKeyContext(self._version, sid=sid)
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- return ""
diff --git a/examples/python/twilio/rest/iam/v1/get_api_keys.py b/examples/python/twilio/rest/iam/v1/get_api_keys.py
deleted file mode 100644
index 6ff9a4eff..000000000
--- a/examples/python/twilio/rest/iam/v1/get_api_keys.py
+++ /dev/null
@@ -1,304 +0,0 @@
-r"""
- This code was generated by
- ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-
- Twilio - Iam
- This is the public Twilio REST API.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- https://openapi-generator.tech
- Do not edit the class manually.
-"""
-
-
-from datetime import datetime
-from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
-from twilio.base import deserialize, values
-
-from twilio.base.instance_resource import InstanceResource
-from twilio.base.list_resource import ListResource
-from twilio.base.version import Version
-from twilio.base.page import Page
-
-
-class GetApiKeysInstance(InstanceResource):
-
- """
- :ivar sid: The unique string that we created to identify the Key resource.
- :ivar friendly_name: The string that you assigned to describe the resource.
- :ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- :ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- """
-
- def __init__(self, version: Version, payload: Dict[str, Any]):
- super().__init__(version)
-
- self.sid: Optional[str] = payload.get("sid")
- self.friendly_name: Optional[str] = payload.get("friendly_name")
- self.date_created: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_created")
- )
- self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_updated")
- )
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
-
- return ""
-
-
-class GetApiKeysPage(Page):
- def get_instance(self, payload: Dict[str, Any]) -> GetApiKeysInstance:
- """
- Build an instance of GetApiKeysInstance
-
- :param payload: Payload response from the API
- """
- return GetApiKeysInstance(self._version, payload)
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- return ""
-
-
-class GetApiKeysList(ListResource):
- def __init__(self, version: Version):
- """
- Initialize the GetApiKeysList
-
- :param version: Version that contains the resource
-
- """
- super().__init__(version)
-
- self._uri = "/Keys"
-
- def stream(
- self,
- account_sid: Union[str, object] = values.unset,
- limit: Optional[int] = None,
- page_size: Optional[int] = None,
- ) -> Iterator[GetApiKeysInstance]:
- """
- Streams GetApiKeysInstance records from the API as a generator stream.
- This operation lazily loads records as efficiently as possible until the limit
- is reached.
- The results are returned as a generator, so this operation is memory efficient.
-
- :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param limit: Upper limit for the number of records to return. stream()
- guarantees to never return more than limit. Default is no limit
- :param page_size: Number of records to fetch per request, when not set will use
- the default value of 50 records. If no page_size is defined
- but a limit is defined, stream() will attempt to read the
- limit with the most efficient page size, i.e. min(limit, 1000)
-
- :returns: Generator that will yield up to limit results
- """
- limits = self._version.read_limits(limit, page_size)
- page = self.page(account_sid=account_sid, page_size=limits["page_size"])
-
- return self._version.stream(page, limits["limit"])
-
- async def stream_async(
- self,
- account_sid: Union[str, object] = values.unset,
- limit: Optional[int] = None,
- page_size: Optional[int] = None,
- ) -> AsyncIterator[GetApiKeysInstance]:
- """
- Asynchronously streams GetApiKeysInstance records from the API as a generator stream.
- This operation lazily loads records as efficiently as possible until the limit
- is reached.
- The results are returned as a generator, so this operation is memory efficient.
-
- :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param limit: Upper limit for the number of records to return. stream()
- guarantees to never return more than limit. Default is no limit
- :param page_size: Number of records to fetch per request, when not set will use
- the default value of 50 records. If no page_size is defined
- but a limit is defined, stream() will attempt to read the
- limit with the most efficient page size, i.e. min(limit, 1000)
-
- :returns: Generator that will yield up to limit results
- """
- limits = self._version.read_limits(limit, page_size)
- page = await self.page_async(
- account_sid=account_sid, page_size=limits["page_size"]
- )
-
- return self._version.stream_async(page, limits["limit"])
-
- def list(
- self,
- account_sid: Union[str, object] = values.unset,
- limit: Optional[int] = None,
- page_size: Optional[int] = None,
- ) -> List[GetApiKeysInstance]:
- """
- Lists GetApiKeysInstance records from the API as a list.
- Unlike stream(), this operation is eager and will load `limit` records into
- memory before returning.
-
- :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param limit: Upper limit for the number of records to return. list() guarantees
- never to return more than limit. Default is no limit
- :param page_size: Number of records to fetch per request, when not set will use
- the default value of 50 records. If no page_size is defined
- but a limit is defined, list() will attempt to read the limit
- with the most efficient page size, i.e. min(limit, 1000)
-
- :returns: list that will contain up to limit results
- """
- return list(
- self.stream(
- account_sid=account_sid,
- limit=limit,
- page_size=page_size,
- )
- )
-
- async def list_async(
- self,
- account_sid: Union[str, object] = values.unset,
- limit: Optional[int] = None,
- page_size: Optional[int] = None,
- ) -> List[GetApiKeysInstance]:
- """
- Asynchronously lists GetApiKeysInstance records from the API as a list.
- Unlike stream(), this operation is eager and will load `limit` records into
- memory before returning.
-
- :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param limit: Upper limit for the number of records to return. list() guarantees
- never to return more than limit. Default is no limit
- :param page_size: Number of records to fetch per request, when not set will use
- the default value of 50 records. If no page_size is defined
- but a limit is defined, list() will attempt to read the limit
- with the most efficient page size, i.e. min(limit, 1000)
-
- :returns: list that will contain up to limit results
- """
- return [
- record
- async for record in await self.stream_async(
- account_sid=account_sid,
- limit=limit,
- page_size=page_size,
- )
- ]
-
- def page(
- self,
- account_sid: Union[str, object] = values.unset,
- page_token: Union[str, object] = values.unset,
- page_number: Union[int, object] = values.unset,
- page_size: Union[int, object] = values.unset,
- ) -> GetApiKeysPage:
- """
- Retrieve a single page of GetApiKeysInstance records from the API.
- Request is executed immediately
-
- :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param page_token: PageToken provided by the API
- :param page_number: Page Number, this value is simply for client state
- :param page_size: Number of records to return, defaults to 50
-
- :returns: Page of GetApiKeysInstance
- """
- data = values.of(
- {
- "AccountSid": account_sid,
- "PageToken": page_token,
- "Page": page_number,
- "PageSize": page_size,
- }
- )
-
- headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
-
- headers["Accept"] = "application/json"
-
- response = self._version.page(
- method="GET", uri=self._uri, params=data, headers=headers
- )
- return GetApiKeysPage(self._version, response)
-
- async def page_async(
- self,
- account_sid: Union[str, object] = values.unset,
- page_token: Union[str, object] = values.unset,
- page_number: Union[int, object] = values.unset,
- page_size: Union[int, object] = values.unset,
- ) -> GetApiKeysPage:
- """
- Asynchronously retrieve a single page of GetApiKeysInstance records from the API.
- Request is executed immediately
-
- :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param page_token: PageToken provided by the API
- :param page_number: Page Number, this value is simply for client state
- :param page_size: Number of records to return, defaults to 50
-
- :returns: Page of GetApiKeysInstance
- """
- data = values.of(
- {
- "AccountSid": account_sid,
- "PageToken": page_token,
- "Page": page_number,
- "PageSize": page_size,
- }
- )
-
- headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
-
- headers["Accept"] = "application/json"
-
- response = await self._version.page_async(
- method="GET", uri=self._uri, params=data, headers=headers
- )
- return GetApiKeysPage(self._version, response)
-
- def get_page(self, target_url: str) -> GetApiKeysPage:
- """
- Retrieve a specific page of GetApiKeysInstance records from the API.
- Request is executed immediately
-
- :param target_url: API-generated URL for the requested results page
-
- :returns: Page of GetApiKeysInstance
- """
- response = self._version.domain.twilio.request("GET", target_url)
- return GetApiKeysPage(self._version, response)
-
- async def get_page_async(self, target_url: str) -> GetApiKeysPage:
- """
- Asynchronously retrieve a specific page of GetApiKeysInstance records from the API.
- Request is executed immediately
-
- :param target_url: API-generated URL for the requested results page
-
- :returns: Page of GetApiKeysInstance
- """
- response = await self._version.domain.twilio.request_async("GET", target_url)
- return GetApiKeysPage(self._version, response)
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- return ""
diff --git a/examples/python/twilio/rest/iam/v1/new_api_key.py b/examples/python/twilio/rest/iam/v1/new_api_key.py
deleted file mode 100644
index e3e3c12c0..000000000
--- a/examples/python/twilio/rest/iam/v1/new_api_key.py
+++ /dev/null
@@ -1,156 +0,0 @@
-r"""
- This code was generated by
- ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-
- Twilio - Iam
- This is the public Twilio REST API.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- https://openapi-generator.tech
- Do not edit the class manually.
-"""
-
-
-from datetime import datetime
-from typing import Any, Dict, Optional, Union
-from twilio.base import deserialize, serialize, values
-
-from twilio.base.instance_resource import InstanceResource
-from twilio.base.list_resource import ListResource
-from twilio.base.version import Version
-
-
-class NewApiKeyInstance(InstanceResource):
- class Keytype(object):
- RESTRICTED = "restricted"
-
- """
- :ivar sid: The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
- :ivar friendly_name: The string that you assigned to describe the resource.
- :ivar date_created: The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- :ivar date_updated: The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- :ivar secret: The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
- :ivar policy: Collection of allow assertions.
- """
-
- def __init__(self, version: Version, payload: Dict[str, Any]):
- super().__init__(version)
-
- self.sid: Optional[str] = payload.get("sid")
- self.friendly_name: Optional[str] = payload.get("friendly_name")
- self.date_created: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_created")
- )
- self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime(
- payload.get("date_updated")
- )
- self.secret: Optional[str] = payload.get("secret")
- self.policy: Optional[Dict[str, object]] = payload.get("policy")
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
-
- return ""
-
-
-class NewApiKeyList(ListResource):
- def __init__(self, version: Version):
- """
- Initialize the NewApiKeyList
-
- :param version: Version that contains the resource
-
- """
- super().__init__(version)
-
- self._uri = "/Keys"
-
- def create(
- self,
- account_sid: str,
- friendly_name: Union[str, object] = values.unset,
- key_type: Union["NewApiKeyInstance.Keytype", object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> NewApiKeyInstance:
- """
- Create the NewApiKeyInstance
-
- :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param key_type:
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The created NewApiKeyInstance
- """
-
- data = values.of(
- {
- "AccountSid": account_sid,
- "FriendlyName": friendly_name,
- "KeyType": key_type,
- "Policy": serialize.object(policy),
- }
- )
- headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
-
- headers["Content-Type"] = "application/x-www-form-urlencoded"
-
- headers["Accept"] = "application/json"
-
- payload = self._version.create(
- method="POST", uri=self._uri, data=data, headers=headers
- )
-
- return NewApiKeyInstance(self._version, payload)
-
- async def create_async(
- self,
- account_sid: str,
- friendly_name: Union[str, object] = values.unset,
- key_type: Union["NewApiKeyInstance.Keytype", object] = values.unset,
- policy: Union[object, object] = values.unset,
- ) -> NewApiKeyInstance:
- """
- Asynchronously create the NewApiKeyInstance
-
- :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- :param key_type:
- :param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
-
- :returns: The created NewApiKeyInstance
- """
-
- data = values.of(
- {
- "AccountSid": account_sid,
- "FriendlyName": friendly_name,
- "KeyType": key_type,
- "Policy": serialize.object(policy),
- }
- )
- headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
-
- headers["Content-Type"] = "application/x-www-form-urlencoded"
-
- headers["Accept"] = "application/json"
-
- payload = await self._version.create_async(
- method="POST", uri=self._uri, data=data, headers=headers
- )
-
- return NewApiKeyInstance(self._version, payload)
-
- def __repr__(self) -> str:
- """
- Provide a friendly representation
-
- :returns: Machine friendly representation
- """
- return ""
diff --git a/examples/python/twilio/rest/oauth/v2/__init__.py b/examples/python/twilio/rest/oauth/v2/__init__.py
new file mode 100644
index 000000000..c6ed9f1c0
--- /dev/null
+++ b/examples/python/twilio/rest/oauth/v2/__init__.py
@@ -0,0 +1,42 @@
+r"""
+ This code was generated by
+ ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+
+ User OAuth API
+ User OAuth API
+
+ NOTE: This class is auto generated by OpenAPI Generator.
+ https://openapi-generator.tech
+ Do not edit the class manually.
+"""
+
+from typing import Optional
+from twilio.base.version import Version
+from twilio.base.domain import Domain
+from twilio.rest.oauth.v2.token import TokenList
+
+
+class V2(Version):
+ def __init__(self, domain: Domain):
+ """
+ Initialize the V2 version of Oauth
+
+ :param domain: The Twilio.oauth domain
+ """
+ super().__init__(domain, "v2")
+ self._token: Optional[TokenList] = None
+
+ @property
+ def token(self) -> TokenList:
+ if self._token is None:
+ self._token = TokenList(self)
+ return self._token
+
+ def __repr__(self) -> str:
+ """
+ Provide a friendly representation
+ :returns: Machine friendly representation
+ """
+ return ""
diff --git a/examples/python/twilio/rest/iam/v1/token.py b/examples/python/twilio/rest/oauth/v2/token.py
similarity index 94%
rename from examples/python/twilio/rest/iam/v1/token.py
rename to examples/python/twilio/rest/oauth/v2/token.py
index c064912a5..860423db6 100644
--- a/examples/python/twilio/rest/iam/v1/token.py
+++ b/examples/python/twilio/rest/oauth/v2/token.py
@@ -4,8 +4,8 @@
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- Twilio - Iam
- This is the public Twilio REST API.
+ User OAuth API
+ User OAuth API
NOTE: This class is auto generated by OpenAPI Generator.
https://openapi-generator.tech
@@ -47,7 +47,7 @@ def __repr__(self) -> str:
:returns: Machine friendly representation
"""
- return ""
+ return ""
class TokenList(ListResource):
@@ -64,8 +64,8 @@ def __init__(self, version: Version):
def create(
self,
- grant_type: str,
- client_id: str,
+ grant_type: Union[str, object] = values.unset,
+ client_id: Union[str, object] = values.unset,
client_secret: Union[str, object] = values.unset,
code: Union[str, object] = values.unset,
redirect_uri: Union[str, object] = values.unset,
@@ -114,8 +114,8 @@ def create(
async def create_async(
self,
- grant_type: str,
- client_id: str,
+ grant_type: Union[str, object] = values.unset,
+ client_id: Union[str, object] = values.unset,
client_secret: Union[str, object] = values.unset,
code: Union[str, object] = values.unset,
redirect_uri: Union[str, object] = values.unset,
@@ -168,4 +168,4 @@ def __repr__(self) -> str:
:returns: Machine friendly representation
"""
- return ""
+ return ""
diff --git a/examples/ruby/lib/twilio-ruby/rest/client.rb b/examples/ruby/lib/twilio-ruby/rest/client.rb
index 6dcc9980f..88ee9b4b7 100644
--- a/examples/ruby/lib/twilio-ruby/rest/client.rb
+++ b/examples/ruby/lib/twilio-ruby/rest/client.rb
@@ -37,6 +37,10 @@ def preview_iam
@previewiam ||= PreviewIam.new self
end
+ def oauth
+ @oauth ||= Oauth.new self
+ end
+
##
# @param [integer] testInteger INTEGER ID param!!!
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam/v1.rb b/examples/ruby/lib/twilio-ruby/rest/iam/v1.rb
deleted file mode 100644
index f3889d846..000000000
--- a/examples/ruby/lib/twilio-ruby/rest/iam/v1.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-##
-# This code was generated by
-# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
-# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
-# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-#
-# Twilio - Iam
-# This is the public Twilio REST API.
-#
-# NOTE: This class is auto generated by OpenAPI Generator.
-# https://openapi-generator.tech
-# Do not edit the class manually.
-#
-
-module Twilio
- module REST
- class Iam
- class V1 < Version
- ##
- # Initialize the V1 version of Iam
- def initialize(domain)
- super
- @version = 'v1'
- @api_key = nil
- @get_api_keys = nil
- @new_api_key = nil
- @token = nil
- end
-
- ##
- # @param [String] sid The Twilio-provided string that uniquely identifies the Key resource to fetch.
- # @return [Twilio::REST::Iam::V1::ApiKeyContext] if sid was passed.
- # @return [Twilio::REST::Iam::V1::ApiKeyList]
- def api_key(sid = :unset)
- if sid.nil?
- raise ArgumentError, 'sid cannot be nil'
- end
-
- if sid == :unset
- @api_key ||= ApiKeyList.new self
- else
- ApiKeyContext.new(self, sid)
- end
- end
-
- ##
- # @return [Twilio::REST::Iam::V1::GetApiKeysList]
- def get_api_keys
- @get_api_keys ||= GetApiKeysList.new self
- end
-
- ##
- # @return [Twilio::REST::Iam::V1::NewApiKeyList]
- def new_api_key
- @new_api_key ||= NewApiKeyList.new self
- end
-
- ##
- # @return [Twilio::REST::Iam::V1::TokenList]
- def token
- @token ||= TokenList.new self
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- '';
- end
- end
- end
- end
-end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam/v1/api_key.rb b/examples/ruby/lib/twilio-ruby/rest/iam/v1/api_key.rb
deleted file mode 100644
index 76f18cc70..000000000
--- a/examples/ruby/lib/twilio-ruby/rest/iam/v1/api_key.rb
+++ /dev/null
@@ -1,255 +0,0 @@
-##
-# This code was generated by
-# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
-# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
-# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-#
-# Twilio - Iam
-# This is the public Twilio REST API.
-#
-# NOTE: This class is auto generated by OpenAPI Generator.
-# https://openapi-generator.tech
-# Do not edit the class manually.
-#
-
-module Twilio
- module REST
- class Iam < IamBase
- class V1 < Version
- class ApiKeyList < ListResource
- ##
- # Initialize the ApiKeyList
- # @param [Version] version Version that contains the resource
- # @return [ApiKeyList] ApiKeyList
- def initialize(version)
- super(version)
- # Path Solution
- @solution = {}
- end
-
- # Provide a user friendly representation
- def to_s
- '#'
- end
- end
-
- class ApiKeyContext < InstanceContext
- ##
- # Initialize the ApiKeyContext
- # @param [Version] version Version that contains the resource
- # @param [String] sid The Twilio-provided string that uniquely identifies the Key resource to update.
- # @return [ApiKeyContext] ApiKeyContext
- def initialize(version, sid)
- super(version)
-
- # Path Solution
- @solution = { sid: sid, }
- @uri = "/Keys/#{@solution[:sid]}"
- end
-
- ##
- # Delete the ApiKeyInstance
- # @return [Boolean] True if delete succeeds, false otherwise
- def delete
- headers = Twilio::Values.of({ 'Content-Type' => 'application/x-www-form-urlencoded', })
-
- @version.delete('DELETE', @uri, headers: headers)
- end
-
- ##
- # Fetch the ApiKeyInstance
- # @return [ApiKeyInstance] Fetched ApiKeyInstance
- def fetch
- headers = Twilio::Values.of({ 'Content-Type' => 'application/x-www-form-urlencoded', })
-
- payload = @version.fetch('GET', @uri, headers: headers)
- ApiKeyInstance.new(
- @version,
- payload,
- sid: @solution[:sid],
- )
- end
-
- ##
- # Update the ApiKeyInstance
- # @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- # @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- # @return [ApiKeyInstance] Updated ApiKeyInstance
- def update(
- friendly_name: :unset,
- policy: :unset
- )
- data = Twilio::Values.of({
- 'FriendlyName' => friendly_name,
- 'Policy' => Twilio.serialize_object(policy),
- })
-
- headers = Twilio::Values.of({ 'Content-Type' => 'application/x-www-form-urlencoded', })
-
- payload = @version.update('POST', @uri, data: data, headers: headers)
- ApiKeyInstance.new(
- @version,
- payload,
- sid: @solution[:sid],
- )
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- context = @solution.map { |k, v| "#{k}: #{v}" }.join(',')
- "#"
- end
-
- ##
- # Provide a detailed, user friendly representation
- def inspect
- context = @solution.map { |k, v| "#{k}: #{v}" }.join(',')
- "#"
- end
- end
-
- class ApiKeyPage < Page
- ##
- # Initialize the ApiKeyPage
- # @param [Version] version Version that contains the resource
- # @param [Response] response Response from the API
- # @param [Hash] solution Path solution for the resource
- # @return [ApiKeyPage] ApiKeyPage
- def initialize(version, response, solution)
- super(version, response)
-
- # Path Solution
- @solution = solution
- end
-
- ##
- # Build an instance of ApiKeyInstance
- # @param [Hash] payload Payload response from the API
- # @return [ApiKeyInstance] ApiKeyInstance
- def get_instance(payload)
- ApiKeyInstance.new(@version, payload)
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- ''
- end
- end
-
- class ApiKeyInstance < InstanceResource
- ##
- # Initialize the ApiKeyInstance
- # @param [Version] version Version that contains the resource
- # @param [Hash] payload payload that contains response from Twilio
- # @param [String] account_sid The SID of the
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ApiKey
- # resource.
- # @param [String] sid The SID of the Call resource to fetch.
- # @return [ApiKeyInstance] ApiKeyInstance
- def initialize(version, payload, sid: nil)
- super(version)
-
- # Marshaled Properties
- @properties = {
- 'sid' => payload['sid'],
- 'friendly_name' => payload['friendly_name'],
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
- 'policy' => payload['policy'],
- }
-
- # Context
- @instance_context = nil
- @params = { 'sid' => sid || @properties['sid'], }
- end
-
- ##
- # Generate an instance context for the instance, the context is capable of
- # performing various actions. All instance actions are proxied to the context
- # @return [ApiKeyContext] CallContext for this CallInstance
- def context
- unless @instance_context
- @instance_context = ApiKeyContext.new(@version, @params['sid'])
- end
- @instance_context
- end
-
- ##
- # @return [String] The unique string that we created to identify the Key resource.
- def sid
- @properties['sid']
- end
-
- ##
- # @return [String] The string that you assigned to describe the resource.
- def friendly_name
- @properties['friendly_name']
- end
-
- ##
- # @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_created
- @properties['date_created']
- end
-
- ##
- # @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_updated
- @properties['date_updated']
- end
-
- ##
- # @return [Hash] The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- def policy
- @properties['policy']
- end
-
- ##
- # Delete the ApiKeyInstance
- # @return [Boolean] True if delete succeeds, false otherwise
- def delete
- context.delete
- end
-
- ##
- # Fetch the ApiKeyInstance
- # @return [ApiKeyInstance] Fetched ApiKeyInstance
- def fetch
- context.fetch
- end
-
- ##
- # Update the ApiKeyInstance
- # @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- # @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- # @return [ApiKeyInstance] Updated ApiKeyInstance
- def update(
- friendly_name: :unset,
- policy: :unset
- )
- context.update(
- friendly_name: friendly_name,
- policy: policy,
- )
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- values = @params.map { |k, v| "#{k}: #{v}" }.join(" ")
- ""
- end
-
- ##
- # Provide a detailed, user friendly representation
- def inspect
- values = @properties.map { |k, v| "#{k}: #{v}" }.join(" ")
- ""
- end
- end
- end
- end
- end
-end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb b/examples/ruby/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
deleted file mode 100644
index fc9e1ba21..000000000
--- a/examples/ruby/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
+++ /dev/null
@@ -1,219 +0,0 @@
-##
-# This code was generated by
-# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
-# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
-# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-#
-# Twilio - Iam
-# This is the public Twilio REST API.
-#
-# NOTE: This class is auto generated by OpenAPI Generator.
-# https://openapi-generator.tech
-# Do not edit the class manually.
-#
-
-module Twilio
- module REST
- class Iam < IamBase
- class V1 < Version
- class GetApiKeysList < ListResource
- ##
- # Initialize the GetApiKeysList
- # @param [Version] version Version that contains the resource
- # @return [GetApiKeysList] GetApiKeysList
- def initialize(version)
- super(version)
- # Path Solution
- @solution = {}
- @uri = "/Keys"
- end
-
- ##
- # Lists GetApiKeysInstance records from the API as a list.
- # Unlike stream(), this operation is eager and will load `limit` records into
- # memory before returning.
- # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- # @param [Integer] limit Upper limit for the number of records to return. stream()
- # guarantees to never return more than limit. Default is no limit
- # @param [Integer] page_size Number of records to fetch per request, when
- # not set will use the default value of 50 records. If no page_size is defined
- # but a limit is defined, stream() will attempt to read the limit with the most
- # efficient page size, i.e. min(limit, 1000)
- # @return [Array] Array of up to limit results
- def list(account_sid: nil, limit: nil, page_size: nil)
- self.stream(
- account_sid: account_sid,
- limit: limit,
- page_size: page_size
- ).entries
- end
-
- ##
- # Streams Instance records from the API as an Enumerable.
- # This operation lazily loads records as efficiently as possible until the limit
- # is reached.
- # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- # @param [Integer] limit Upper limit for the number of records to return. stream()
- # guarantees to never return more than limit. Default is no limit
- # @param [Integer] page_size Number of records to fetch per request, when
- # not set will use the default value of 50 records. If no page_size is defined
- # but a limit is defined, stream() will attempt to read the limit with the most
- # efficient page size, i.e. min(limit, 1000)
- # @return [Enumerable] Enumerable that will yield up to limit results
- def stream(account_sid: nil, limit: nil, page_size: nil)
- limits = @version.read_limits(limit, page_size)
-
- page = self.page(
- account_sid: account_sid,
- page_size: limits[:page_size],
- )
-
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
- end
-
- ##
- # When passed a block, yields GetApiKeysInstance records from the API.
- # This operation lazily loads records as efficiently as possible until the limit
- # is reached.
- def each
- limits = @version.read_limits
-
- page = self.page(page_size: limits[:page_size],)
-
- @version.stream(page,
- limit: limits[:limit],
- page_limit: limits[:page_limit]).each { |x| yield x }
- end
-
- ##
- # Retrieve a single page of GetApiKeysInstance records from the API.
- # Request is executed immediately.
- # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- # @param [String] page_token PageToken provided by the API
- # @param [Integer] page_number Page Number, this value is simply for client state
- # @param [Integer] page_size Number of records to return, defaults to 50
- # @return [Page] Page of GetApiKeysInstance
- def page(account_sid: nil, page_token: :unset, page_number: :unset, page_size: :unset)
- params = Twilio::Values.of({
- 'AccountSid' => account_sid,
- 'PageToken' => page_token,
- 'Page' => page_number,
- 'PageSize' => page_size,
- })
- headers = Twilio::Values.of({})
-
- response = @version.page('GET', @uri, params: params, headers: headers)
-
- GetApiKeysPage.new(@version, response, @solution)
- end
-
- ##
- # Retrieve a single page of GetApiKeysInstance records from the API.
- # Request is executed immediately.
- # @param [String] target_url API-generated URL for the requested results page
- # @return [Page] Page of GetApiKeysInstance
- def get_page(target_url)
- response = @version.domain.request(
- 'GET',
- target_url
- )
- GetApiKeysPage.new(@version, response, @solution)
- end
-
- # Provide a user friendly representation
- def to_s
- '#'
- end
- end
-
- class GetApiKeysPage < Page
- ##
- # Initialize the GetApiKeysPage
- # @param [Version] version Version that contains the resource
- # @param [Response] response Response from the API
- # @param [Hash] solution Path solution for the resource
- # @return [GetApiKeysPage] GetApiKeysPage
- def initialize(version, response, solution)
- super(version, response)
-
- # Path Solution
- @solution = solution
- end
-
- ##
- # Build an instance of GetApiKeysInstance
- # @param [Hash] payload Payload response from the API
- # @return [GetApiKeysInstance] GetApiKeysInstance
- def get_instance(payload)
- GetApiKeysInstance.new(@version, payload)
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- ''
- end
- end
-
- class GetApiKeysInstance < InstanceResource
- ##
- # Initialize the GetApiKeysInstance
- # @param [Version] version Version that contains the resource
- # @param [Hash] payload payload that contains response from Twilio
- # @param [String] account_sid The SID of the
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this GetApiKeys
- # resource.
- # @param [String] sid The SID of the Call resource to fetch.
- # @return [GetApiKeysInstance] GetApiKeysInstance
- def initialize(version, payload)
- super(version)
-
- # Marshaled Properties
- @properties = {
- 'sid' => payload['sid'],
- 'friendly_name' => payload['friendly_name'],
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
- }
- end
-
- ##
- # @return [String] The unique string that we created to identify the Key resource.
- def sid
- @properties['sid']
- end
-
- ##
- # @return [String] The string that you assigned to describe the resource.
- def friendly_name
- @properties['friendly_name']
- end
-
- ##
- # @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_created
- @properties['date_created']
- end
-
- ##
- # @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_updated
- @properties['date_updated']
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- ""
- end
-
- ##
- # Provide a detailed, user friendly representation
- def inspect
- ""
- end
- end
- end
- end
- end
-end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam/v1/new_api_key.rb b/examples/ruby/lib/twilio-ruby/rest/iam/v1/new_api_key.rb
deleted file mode 100644
index 25b09276c..000000000
--- a/examples/ruby/lib/twilio-ruby/rest/iam/v1/new_api_key.rb
+++ /dev/null
@@ -1,170 +0,0 @@
-##
-# This code was generated by
-# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
-# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
-# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
-#
-# Twilio - Iam
-# This is the public Twilio REST API.
-#
-# NOTE: This class is auto generated by OpenAPI Generator.
-# https://openapi-generator.tech
-# Do not edit the class manually.
-#
-
-module Twilio
- module REST
- class Iam < IamBase
- class V1 < Version
- class NewApiKeyList < ListResource
- ##
- # Initialize the NewApiKeyList
- # @param [Version] version Version that contains the resource
- # @return [NewApiKeyList] NewApiKeyList
- def initialize(version)
- super(version)
- # Path Solution
- @solution = {}
- @uri = "/Keys"
- end
-
- ##
- # Create the NewApiKeyInstance
- # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
- # @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- # @param [Keytype] key_type
- # @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
- # @return [NewApiKeyInstance] Created NewApiKeyInstance
- def create(
- account_sid: nil,
- friendly_name: :unset,
- key_type: :unset,
- policy: :unset
- )
- data = Twilio::Values.of({
- 'AccountSid' => account_sid,
- 'FriendlyName' => friendly_name,
- 'KeyType' => key_type,
- 'Policy' => Twilio.serialize_object(policy),
- })
-
- headers = Twilio::Values.of({ 'Content-Type' => 'application/x-www-form-urlencoded', })
-
- payload = @version.create('POST', @uri, data: data, headers: headers)
- NewApiKeyInstance.new(
- @version,
- payload,
- )
- end
-
- # Provide a user friendly representation
- def to_s
- '#'
- end
- end
-
- class NewApiKeyPage < Page
- ##
- # Initialize the NewApiKeyPage
- # @param [Version] version Version that contains the resource
- # @param [Response] response Response from the API
- # @param [Hash] solution Path solution for the resource
- # @return [NewApiKeyPage] NewApiKeyPage
- def initialize(version, response, solution)
- super(version, response)
-
- # Path Solution
- @solution = solution
- end
-
- ##
- # Build an instance of NewApiKeyInstance
- # @param [Hash] payload Payload response from the API
- # @return [NewApiKeyInstance] NewApiKeyInstance
- def get_instance(payload)
- NewApiKeyInstance.new(@version, payload)
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- ''
- end
- end
-
- class NewApiKeyInstance < InstanceResource
- ##
- # Initialize the NewApiKeyInstance
- # @param [Version] version Version that contains the resource
- # @param [Hash] payload payload that contains response from Twilio
- # @param [String] account_sid The SID of the
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
- # resource.
- # @param [String] sid The SID of the Call resource to fetch.
- # @return [NewApiKeyInstance] NewApiKeyInstance
- def initialize(version, payload)
- super(version)
-
- # Marshaled Properties
- @properties = {
- 'sid' => payload['sid'],
- 'friendly_name' => payload['friendly_name'],
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
- 'secret' => payload['secret'],
- 'policy' => payload['policy'],
- }
- end
-
- ##
- # @return [String] The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
- def sid
- @properties['sid']
- end
-
- ##
- # @return [String] The string that you assigned to describe the resource.
- def friendly_name
- @properties['friendly_name']
- end
-
- ##
- # @return [Time] The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_created
- @properties['date_created']
- end
-
- ##
- # @return [Time] The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- def date_updated
- @properties['date_updated']
- end
-
- ##
- # @return [String] The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
- def secret
- @properties['secret']
- end
-
- ##
- # @return [Hash] Collection of allow assertions.
- def policy
- @properties['policy']
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- ""
- end
-
- ##
- # Provide a detailed, user friendly representation
- def inspect
- ""
- end
- end
- end
- end
- end
-end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam.rb b/examples/ruby/lib/twilio-ruby/rest/oauth.rb
similarity index 62%
rename from examples/ruby/lib/twilio-ruby/rest/iam.rb
rename to examples/ruby/lib/twilio-ruby/rest/oauth.rb
index cbcfe6628..5be3e6e71 100644
--- a/examples/ruby/lib/twilio-ruby/rest/iam.rb
+++ b/examples/ruby/lib/twilio-ruby/rest/oauth.rb
@@ -1,6 +1,6 @@
module Twilio
module REST
- class Iam < IamBase
+ class Oauth < OauthBase
end
end
end
diff --git a/examples/ruby/lib/twilio-ruby/rest/oauth/v2.rb b/examples/ruby/lib/twilio-ruby/rest/oauth/v2.rb
new file mode 100644
index 000000000..6b7ad52a9
--- /dev/null
+++ b/examples/ruby/lib/twilio-ruby/rest/oauth/v2.rb
@@ -0,0 +1,41 @@
+##
+# This code was generated by
+# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+#
+# User OAuth API
+# User OAuth API
+#
+# NOTE: This class is auto generated by OpenAPI Generator.
+# https://openapi-generator.tech
+# Do not edit the class manually.
+#
+
+module Twilio
+ module REST
+ class Oauth
+ class V2 < Version
+ ##
+ # Initialize the V2 version of Oauth
+ def initialize(domain)
+ super
+ @version = 'v2'
+ @token = nil
+ end
+
+ ##
+ # @return [Twilio::REST::Oauth::V2::TokenList]
+ def token
+ @token ||= TokenList.new self
+ end
+
+ ##
+ # Provide a user friendly representation
+ def to_s
+ '';
+ end
+ end
+ end
+ end
+end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam/v1/token.rb b/examples/ruby/lib/twilio-ruby/rest/oauth/v2/token.rb
similarity index 94%
rename from examples/ruby/lib/twilio-ruby/rest/iam/v1/token.rb
rename to examples/ruby/lib/twilio-ruby/rest/oauth/v2/token.rb
index 3f368de43..f2f54bf56 100644
--- a/examples/ruby/lib/twilio-ruby/rest/iam/v1/token.rb
+++ b/examples/ruby/lib/twilio-ruby/rest/oauth/v2/token.rb
@@ -4,8 +4,8 @@
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
#
-# Twilio - Iam
-# This is the public Twilio REST API.
+# User OAuth API
+# User OAuth API
#
# NOTE: This class is auto generated by OpenAPI Generator.
# https://openapi-generator.tech
@@ -14,8 +14,8 @@
module Twilio
module REST
- class Iam < IamBase
- class V1 < Version
+ class Oauth < OauthBase
+ class V2 < Version
class TokenList < ListResource
##
# Initialize the TokenList
@@ -40,8 +40,8 @@ def initialize(version)
# @param [String] scope The scope of token
# @return [TokenInstance] Created TokenInstance
def create(
- grant_type: nil,
- client_id: nil,
+ grant_type: :unset,
+ client_id: :unset,
client_secret: :unset,
code: :unset,
redirect_uri: :unset,
@@ -71,7 +71,7 @@ def create(
# Provide a user friendly representation
def to_s
- '#'
+ '#'
end
end
@@ -100,7 +100,7 @@ def get_instance(payload)
##
# Provide a user friendly representation
def to_s
- ''
+ ''
end
end
@@ -160,13 +160,13 @@ def expires_in
##
# Provide a user friendly representation
def to_s
- ""
+ ""
end
##
# Provide a detailed, user friendly representation
def inspect
- ""
+ ""
end
end
end
diff --git a/examples/ruby/lib/twilio-ruby/rest/iam_base.rb b/examples/ruby/lib/twilio-ruby/rest/oauth_base.rb
similarity index 77%
rename from examples/ruby/lib/twilio-ruby/rest/iam_base.rb
rename to examples/ruby/lib/twilio-ruby/rest/oauth_base.rb
index ca2e87c9d..883082e8d 100644
--- a/examples/ruby/lib/twilio-ruby/rest/iam_base.rb
+++ b/examples/ruby/lib/twilio-ruby/rest/oauth_base.rb
@@ -11,28 +11,28 @@
module Twilio
module REST
- class IamBase < Domain
+ class OauthBase < Domain
##
- # Initialize iam domain
+ # Initialize oauth domain
#
# @param twilio - The twilio client
#
def initialize(twilio)
super(twilio)
- @base_url = "https://iam.twilio.com"
- @host = "iam.twilio.com"
+ @base_url = "https://oauth.twilio.com"
+ @host = "oauth.twilio.com"
@port = 443
@v1 = nil
end
- def v1
- @v1 ||= Iam::V1.new(self)
+ def v2
+ @v2 ||= Oauth::V2.new(self)
end
##
# Provide a user friendly representation
def to_s
- '';
+ '';
end
end
end
diff --git a/examples/spec/twilio_iam_v1.yaml b/examples/spec/twilio_iam_v1.yaml
deleted file mode 100644
index 20fd0aad2..000000000
--- a/examples/spec/twilio_iam_v1.yaml
+++ /dev/null
@@ -1,826 +0,0 @@
-components:
- securitySchemes:
- accountSid_authToken:
- scheme: basic
- type: http
- schemas:
- accounts_enum_status:
- type: string
- enum:
- - active
- - suspended
- - closed
- accounts_enum_type:
- type: string
- enum:
- - Trial
- - Full
- iam.v1.get_keys:
- type: object
- properties:
- sid:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- nullable: true
- description: The unique string that we created to identify the Key resource.
- friendly_name:
- type: string
- nullable: true
- description: The string that you assigned to describe the resource.
- date_created:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the resource was created specified
- in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- date_updated:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the resource was last updated
- specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- iam.v1.key:
- type: object
- properties:
- sid:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- nullable: true
- description: The unique string that we created to identify the Key resource.
- friendly_name:
- type: string
- nullable: true
- description: The string that you assigned to describe the resource.
- x-twilio:
- pii:
- handling: standard
- deleteSla: 30
- date_created:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the resource was created specified
- in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- date_updated:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the resource was last updated
- specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- policy:
- nullable: true
- type: object
- description: 'The \`Policy\` object is a collection that specifies the allowed
- Twilio permissions for the restricted key.
-
- For more information on the permissions available with restricted API
- keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).'
- iam.v1.new_key:
- type: object
- properties:
- sid:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- nullable: true
- description: The unique string that that we created to identify the NewKey
- resource. You will use this as the basic-auth `user` when authenticating
- to the API.
- friendly_name:
- type: string
- nullable: true
- description: The string that you assigned to describe the resource.
- x-twilio:
- pii:
- handling: standard
- deleteSla: 30
- date_created:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the API Key was created specified
- in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- date_updated:
- type: string
- format: date-time-rfc-2822
- nullable: true
- description: The date and time in GMT that the new API Key was last updated
- specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- secret:
- type: string
- nullable: true
- description: The secret your application uses to sign Access Tokens and
- to authenticate to the REST API (you will use this as the basic-auth `password`). **Note
- that for security reasons, this field is ONLY returned when the API Key
- is first created.**
- policy:
- nullable: true
- type: object
- description: Collection of allow assertions.
- new_key_enum_keytype:
- type: string
- enum:
- - restricted
- role_enum_scope_type:
- type: string
- enum:
- - ORGANIZATION
- - ACCOUNT
- - SUB_ACCOUNT
- - RESOURCE
- oauth.v1.token:
- type: object
- properties:
- access_token:
- type: string
- nullable: true
- description: Token which carries the necessary information to access a Twilio
- resource directly.
- refresh_token:
- type: string
- nullable: true
- description: Token which carries the information necessary to get a new
- access token.
- id_token:
- type: string
- nullable: true
- description: Token which carries the information necessary of user profile.
- token_type:
- type: string
- nullable: true
- description: Token type
- expires_in:
- type: integer
- format: int64
- nullable: true
- iam.v1.account_search_account:
- type: object
- properties:
- accountSid:
- type: string
- nullable: true
- accountPath:
- type: string
- nullable: true
- status:
- type: integer
- default: 0
- dormant:
- type: boolean
- nullable: true
- trial:
- type: boolean
- nullable: true
- memberPlatform:
- type: string
- nullable: true
- friendlyName:
- type: string
- nullable: true
- subaccount:
- type: boolean
- nullable: true
- iam.v1.account_search_list_meta:
- type: object
- properties:
- previousToken:
- type: string
- nullable: true
- nextToken:
- type: string
- nullable: true
- pageSize:
- type: integer
- default: 0
- totalPages:
- type: integer
- default: 0
- totalResults:
- type: integer
- default: 0
- iam.v1.account_search_role_response:
- type: array
- items:
- type: object
- properties:
- roleSid:
- type: string
- friendlyName:
- type: string
- nullable: true
- description:
- type: string
- nullable: true
- twilio.service_error_response:
- type: object
- properties:
- code:
- description: Twilio-specific error code
- type: integer
- format: int32
- message:
- description: Error message
- type: string
- more_info:
- description: Link to Error Code References
- type: string
- status:
- description: HTTP response status code
- type: integer
- format: int32
- iam.v1.account_search_request:
- type: object
- properties:
- searchString:
- type: string
- nullable: true
- parentAccountId:
- type: string
- nullable: true
- status:
- type: array
- items:
- type: integer
- nullable: true
- dormant:
- type: boolean
- nullable: true
- trial:
- type: boolean
- nullable: true
- iam.v1.account_stats_response:
- type: object
- properties:
- numberOfAccounts:
- type: integer
- default: 0
-info:
- title: Twilio - Iam
- description: This is the public Twilio REST API.
- termsOfService: https://www.twilio.com/legal/tos
- contact:
- name: Twilio Support
- url: https://support.twilio.com
- email: support@twilio.com
- license:
- name: Apache 2.0
- url: https://www.apache.org/licenses/LICENSE-2.0.html
- version: 1.0.0
-openapi: 3.0.1
-paths:
- /v1/Keys:
- servers:
- - url: https://iam.twilio.com
- description: API keys
- x-twilio:
- defaultOutputProperties:
- - sid
- - friendly_name
- - date_created
- mountName: get_api_keys
- className: get_api_keys
- pathType: list
- get:
- description: Retrieve a list of all Keys for a account.
- tags:
- - IamV1GetApiKeys
- parameters:
- - name: AccountSid
- in: query
- description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
- that created the Payments resource.
- schema:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^AC[0-9a-fA-F]{32}$
- required: true
- examples:
- readEmpty:
- value: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- readFull:
- value: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- - name: PageSize
- in: query
- description: How many resources to return in each list page. The default is
- 50, and the maximum is 1000.
- schema:
- type: integer
- format: int64
- minimum: 1
- maximum: 1000
- - name: Page
- in: query
- description: The page index. This value is simply for client state.
- schema:
- type: integer
- minimum: 0
- - name: PageToken
- in: query
- description: The page token. This is provided by the API.
- schema:
- type: string
- responses:
- '200':
- content:
- application/json:
- schema:
- type: object
- properties:
- keys:
- type: array
- items:
- $ref: '#/components/schemas/iam.v1.get_keys'
- meta:
- properties:
- first_page_url:
- format: uri
- type: string
- key:
- type: string
- next_page_url:
- format: uri
- nullable: true
- type: string
- page:
- type: integer
- page_size:
- type: integer
- previous_page_url:
- format: uri
- nullable: true
- type: string
- url:
- format: uri
- type: string
- type: object
- title: ListGetKeysResponse
- examples:
- readEmpty:
- value:
- keys: []
- meta:
- page: 0
- page_size: 50
- first_page_url: https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0
- previous_page_url: null
- url: https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0
- next_page_url: null
- key: keys
- readFull:
- value:
- keys:
- - sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- - sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab
- friendly_name: bar
- date_created: Mon, 13 Jun 2016 20:50:08 +0000
- date_updated: Mon, 13 Jun 2016 20:50:08 +0000
- meta:
- page: 0
- page_size: 50
- first_page_url: https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0
- previous_page_url: null
- url: https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0
- next_page_url: null
- key: keys
- headers:
- Access-Control-Allow-Origin:
- description: Specify the origin(s) allowed to access the resource
- schema:
- type: string
- example: '*'
- Access-Control-Allow-Methods:
- description: Specify the HTTP methods allowed when accessing the resource
- schema:
- type: string
- example: POST, OPTIONS
- Access-Control-Allow-Headers:
- description: Specify the headers allowed when accessing the resource
- schema:
- type: string
- example: Content-Type, Authorization
- Access-Control-Allow-Credentials:
- description: Indicates whether the browser should include credentials
- schema:
- type: boolean
- Access-Control-Expose-Headers:
- description: Headers exposed to the client
- schema:
- type: string
- example: X-Custom-Header1, X-Custom-Header2
- description: OK
- security:
- - accountSid_authToken: []
- operationId: ListGetKeys
- post:
- description: Create a new Signing Key for the account making the request.
- tags:
- - IamV1NewApiKey
- responses:
- '201':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/iam.v1.new_key'
- examples:
- createStandardKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- secret: foobar
- policy: null
- createRestrictedKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- secret: foobar
- policy:
- allow:
- - /twilio/messaging/messages/read
- headers:
- Access-Control-Allow-Origin:
- description: Specify the origin(s) allowed to access the resource
- schema:
- type: string
- example: '*'
- Access-Control-Allow-Methods:
- description: Specify the HTTP methods allowed when accessing the resource
- schema:
- type: string
- example: POST, OPTIONS
- Access-Control-Allow-Headers:
- description: Specify the headers allowed when accessing the resource
- schema:
- type: string
- example: Content-Type, Authorization
- Access-Control-Allow-Credentials:
- description: Indicates whether the browser should include credentials
- schema:
- type: boolean
- Access-Control-Expose-Headers:
- description: Headers exposed to the client
- schema:
- type: string
- example: X-Custom-Header1, X-Custom-Header2
- description: Created
- security:
- - accountSid_authToken: []
- operationId: CreateNewKey
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- title: CreateNewKeyRequest
- properties:
- AccountSid:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^AC[0-9a-fA-F]{32}$
- description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
- that created the Payments resource.
- FriendlyName:
- type: string
- description: A descriptive string that you create to describe the
- resource. It can be up to 64 characters long.
- KeyType:
- type: string
- $ref: '#/components/schemas/new_key_enum_keytype'
- description: 'The \`KeyType\` form parameter is used to specify
- the type of key you want to create.
-
-
- **Default Behavior**: If \`KeyType\` is not specified, the API
- will generate a standard key.
-
-
- **Restricted Key**: If \`KeyType\` is set to \`restricted\`, the
- API will create a new restricted key. In this case, a policy object
- is required to define the permissions.'
- Policy:
- description: 'The \`Policy\` object is a collection that specifies
- the allowed Twilio permissions for the restricted key.
-
- For more information on the permissions available with restricted
- API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).'
- required:
- - AccountSid
- examples:
- createStandardKey:
- value:
- FriendlyName: foo
- AccountSid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- createRestrictedKey:
- value:
- FriendlyName: foo
- AccountSid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- KeyType: restricted
- Policy: '{"allow":["/twilio/messaging/messages/read"]}'
- x-twilio:
- mountName: new_api_key
- /v1/Keys/{Sid}:
- servers:
- - url: https://iam.twilio.com
- description: API keys
- x-twilio:
- defaultOutputProperties:
- - sid
- - friendly_name
- - date_created
- mountName: api_key
- pathType: instance
- get:
- description: Fetch a specific Key.
- tags:
- - IamV1ApiKey
- parameters:
- - name: Sid
- in: path
- description: The Twilio-provided string that uniquely identifies the Key resource
- to fetch.
- schema:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- required: true
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/iam.v1.key'
- examples:
- fetchStandardKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- policy: null
- fetchRestrictedKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- policy:
- allow:
- - /twilio/messaging/messages/read
- headers:
- Access-Control-Allow-Origin:
- description: Specify the origin(s) allowed to access the resource
- schema:
- type: string
- example: '*'
- Access-Control-Allow-Methods:
- description: Specify the HTTP methods allowed when accessing the resource
- schema:
- type: string
- example: POST, OPTIONS
- Access-Control-Allow-Headers:
- description: Specify the headers allowed when accessing the resource
- schema:
- type: string
- example: Content-Type, Authorization
- Access-Control-Allow-Credentials:
- description: Indicates whether the browser should include credentials
- schema:
- type: boolean
- Access-Control-Expose-Headers:
- description: Headers exposed to the client
- schema:
- type: string
- example: X-Custom-Header1, X-Custom-Header2
- description: OK
- security:
- - accountSid_authToken: []
- operationId: FetchKey
- post:
- description: Update a specific Key.
- tags:
- - IamV1ApiKey
- parameters:
- - name: Sid
- in: path
- description: The Twilio-provided string that uniquely identifies the Key resource
- to update.
- schema:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- required: true
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/iam.v1.key'
- examples:
- updateStandardKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- policy: null
- updateRestrictedKey:
- value:
- sid: SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- friendly_name: foo
- date_created: Mon, 13 Jun 2016 22:50:08 +0000
- date_updated: Mon, 13 Jun 2016 22:50:08 +0000
- policy:
- allow:
- - /twilio/messaging/messages/read
- - /twilio/messaging/messages/update
- headers:
- Access-Control-Allow-Origin:
- description: Specify the origin(s) allowed to access the resource
- schema:
- type: string
- example: '*'
- Access-Control-Allow-Methods:
- description: Specify the HTTP methods allowed when accessing the resource
- schema:
- type: string
- example: POST, OPTIONS
- Access-Control-Allow-Headers:
- description: Specify the headers allowed when accessing the resource
- schema:
- type: string
- example: Content-Type, Authorization
- Access-Control-Allow-Credentials:
- description: Indicates whether the browser should include credentials
- schema:
- type: boolean
- Access-Control-Expose-Headers:
- description: Headers exposed to the client
- schema:
- type: string
- example: X-Custom-Header1, X-Custom-Header2
- description: OK
- security:
- - accountSid_authToken: []
- operationId: UpdateKey
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- title: UpdateKeyRequest
- properties:
- FriendlyName:
- type: string
- description: A descriptive string that you create to describe the
- resource. It can be up to 64 characters long.
- Policy:
- description: 'The \`Policy\` object is a collection that specifies
- the allowed Twilio permissions for the restricted key.
-
- For more information on the permissions available with restricted
- API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).'
- examples:
- updateStandardKey:
- value:
- FriendlyName: foo
- updateRestrictedKey:
- value:
- FriendlyName: foo
- Policy: '{"allow":["/twilio/messaging/messages/read", "/twilio/messaging/messages/update"]}'
- delete:
- description: Delete a specific Key.
- tags:
- - IamV1ApiKey
- parameters:
- - name: Sid
- in: path
- description: The Twilio-provided string that uniquely identifies the Key resource
- to delete.
- schema:
- type: string
- minLength: 34
- maxLength: 34
- pattern: ^SK[0-9a-fA-F]{32}$
- required: true
- responses:
- '204':
- description: The resource was deleted successfully.
- security:
- - accountSid_authToken: []
- operationId: DeleteKey
- /v1/token:
- servers:
- - url: https://iam.twilio.com
- x-twilio:
- defaultOutputProperties: []
- pathType: list
- post:
- security: []
- tags:
- - OauthV1Token
- summary: Issues a new Access token (optionally identity_token & refresh_token)
- in exchange of Oauth grant
- operationId: CreateToken
- responses:
- '201':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/oauth.v1.token'
- examples:
- create:
- value:
- access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
- refresh_token: ghjbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
- id_token: eyJhbdGciOiIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
- expires_in: 1438315200000
- token_type: bearer
- description: Created
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- title: CreateTokenRequest
- properties:
- grant_type:
- type: string
- description: Grant type is a credential representing resource owner's
- authorization which can be used by client to obtain access token.
- client_id:
- type: string
- description: A 34 character string that uniquely identifies this
- OAuth App.
- client_secret:
- type: string
- description: The credential for confidential OAuth App.
- code:
- type: string
- description: JWT token related to the authorization code grant type.
- redirect_uri:
- type: string
- description: The redirect uri
- audience:
- type: string
- description: The targeted audience uri
- refresh_token:
- type: string
- description: JWT token related to refresh access token.
- scope:
- type: string
- description: The scope of token
- required:
- - grant_type
- - client_id
- examples:
- create:
- value:
- client_id: OQ7cda1a615f05a95634e643aaaf7081d7
- client_secret: sUWblrQ4wx_aYkdAWjHXNvHinynkYOgBoiRyEQUeEntpgDEG47qnBFD98yoEzsTh
- grant_type: client_credentials
- redirect_uri: ''
- audience: ''
- code: ''
- refresh_token: refresh_token
- scope: scope
- required: true
- /search/v1/user-accounts: {}
- /search/v1/user-accounts/account/{accountSid}/roles: {}
- /search/v1/user-accounts/stats: {}
-servers:
-- url: https://iam.twilio.com
-tags:
-- name: IamV1Account
-- name: IamV1ApiKey
-- name: IamV1Authenticate
-- name: IamV1GetApiKeys
-- name: IamV1Index
-- name: IamV1NewApiKey
-- name: IamV1Permission
-- name: IamV1PolicyAssignment
-- name: IamV1PublicKey
-- name: IamV1RefreshToken
-- name: IamV1Role
-- name: IamV1RoleAssignmentBatch
-- name: IamV1RoleBySid
-- name: IamV1Saml2
-- name: IamV1Token
-- name: IamV1ValidateToken
-- name: IamV1Version
-security:
-- accountSid_authToken: []
diff --git a/examples/spec/twilio_oauth_v2.yaml b/examples/spec/twilio_oauth_v2.yaml
new file mode 100644
index 000000000..d9b6e260e
--- /dev/null
+++ b/examples/spec/twilio_oauth_v2.yaml
@@ -0,0 +1,286 @@
+security:
+- accountSid_authToken: []
+openapi: 3.0.1
+info:
+ title: User OAuth API
+ description: User OAuth API
+ termsOfService: https://www.twilio.com/legal/tos
+ contact:
+ name: Twilio Support
+ url: https://support.twilio.com
+ email: support@twilio.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+ version: 1.0.0
+servers:
+- url: https://oauth.twilio.com
+paths:
+ /v2/token:
+ x-twilio:
+ defaultOutputProperties: []
+ pathType: list
+ post:
+ security: []
+ tags:
+ - OauthV2Token
+ summary: Issues a new Access token (optionally identity_token & refresh_token)
+ in exchange of Oauth grant
+ operationId: CreateOauth2Token
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ title: CreateTokenRequest
+ properties:
+ grant_type:
+ type: string
+ description: Grant type is a credential representing resource owner's
+ authorization which can be used by client to obtain access token.
+ client_id:
+ type: string
+ description: A 34 character string that uniquely identifies this
+ OAuth App.
+ client_secret:
+ type: string
+ description: The credential for confidential OAuth App.
+ code:
+ type: string
+ description: JWT token related to the authorization code grant type.
+ redirect_uri:
+ type: string
+ description: The redirect uri
+ audience:
+ type: string
+ description: The targeted audience uri
+ refresh_token:
+ type: string
+ description: JWT token related to refresh access token.
+ scope:
+ type: string
+ description: The scope of token
+ examples:
+ create:
+ value:
+ client_id: OQ7cda1a615f05a95634e643aaaf7081d7
+ client_secret: sUWblrQ4wx_aYkdAWjHXNvHinynkYOgBoiRyEQUeEntpgDEG47qnBFD98yoEzsTh
+ grant_type: client_credentials
+ redirect_uri: ''
+ audience: ''
+ code: ''
+ refresh_token: refresh_token
+ scope: scope
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/V2Oauth2TokenResponse'
+ examples:
+ create:
+ value:
+ access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
+ refresh_token: ghjbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
+ id_token: eyJhbdGciOiIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
+ expires_in: 1438315200000
+ token_type: bearer
+ description: Created
+ '400':
+ $ref: '#/components/responses/ErrorClientErrorResponse'
+ '500':
+ $ref: '#/components/responses/ErrorResponse'
+components:
+ securitySchemes:
+ accountSid_authToken:
+ scheme: basic
+ type: http
+ v2_oauth2_client_credentials:
+ type: oauth2
+ flows:
+ clientCredentials:
+ tokenUrl: https://oauth.twilio.com/v2/token
+ scopes: {}
+ schemas:
+ Auth0SignupRequest:
+ required:
+ - email
+ type: object
+ properties:
+ email:
+ type: string
+ deeplink:
+ type: string
+ organizationSid:
+ pattern: OR[0-9a-f]{32}
+ type: string
+ format: OrganizationSid
+ example: ORbfd75767416fbd8418bedafce743700a
+ notificationSid:
+ pattern: NF[0-9a-f]{32}
+ type: string
+ format: IdentityNotificationSid
+ example: NFbfd75767416fbd8418bedafce743700a
+ oneConsole:
+ type: boolean
+ Auth0AuthenticationCodeExchangeRequest:
+ required:
+ - authorizationCode
+ type: object
+ properties:
+ authorizationCode:
+ type: string
+ state:
+ type: string
+ codeVerifier:
+ type: string
+ nonce:
+ type: string
+ Auth0AuthorizeResponse:
+ required:
+ - redirect
+ type: object
+ properties:
+ email:
+ type: string
+ redirect:
+ type: string
+ isSso:
+ type: boolean
+ Auth0TokenResponse:
+ required:
+ - accessToken
+ - idToken
+ - authContext
+ - isPurgatory
+ type: object
+ properties:
+ accessToken:
+ type: string
+ idToken:
+ type: string
+ authContext:
+ type: string
+ isPurgatory:
+ type: boolean
+ Auth0RefreshScopedTokenRequest:
+ type: object
+ properties:
+ accountSid:
+ type: string
+ minLength: 34
+ maxLength: 34
+ pattern: ^AC[0-9a-fA-F]{32}$
+ description: The SID of the account to be authorized for the user.
+ authorizationContext:
+ type: string
+ enum:
+ - account
+ - user
+ - organization
+ Auth0RefreshTokenResponse:
+ required:
+ - accessToken
+ type: object
+ properties:
+ accessToken:
+ type: string
+ Auth0LoginEmailRequest:
+ required:
+ - email
+ type: object
+ properties:
+ email:
+ type: string
+ callbackUri:
+ type: string
+ Auth0TestLoginRequest:
+ required:
+ - email
+ - password
+ type: object
+ properties:
+ email:
+ type: string
+ password:
+ type: string
+ Auth0TestLoginResponse:
+ required:
+ - accessToken
+ type: object
+ properties:
+ accessToken:
+ type: string
+ idToken:
+ type: string
+ V2Oauth2TokenResponse:
+ type: object
+ properties:
+ access_token:
+ type: string
+ nullable: true
+ description: Token which carries the necessary information to access a Twilio
+ resource directly.
+ refresh_token:
+ type: string
+ nullable: true
+ description: Token which carries the information necessary to get a new
+ access token.
+ id_token:
+ type: string
+ nullable: true
+ description: Token which carries the information necessary of user profile.
+ token_type:
+ type: string
+ nullable: true
+ description: Token type
+ expires_in:
+ type: integer
+ format: int64
+ nullable: true
+ Error:
+ description: Generic error
+ type: object
+ properties:
+ code:
+ description: Twilio-specific error code
+ type: integer
+ format: int32
+ message:
+ description: Error message
+ type: string
+ more_info:
+ description: Link to Error Code References
+ type: string
+ status:
+ description: HTTP response status code
+ type: integer
+ format: int32
+ responses:
+ ErrorClientErrorResponse:
+ description: Client provided invalid parameters response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ examples:
+ client_error:
+ value:
+ code: 400
+ message: bad request
+ more_info: https://www.twilio.com/docs/errors/400
+ status: 400
+ ErrorResponse:
+ description: Generic error response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ examples:
+ internal_server_error:
+ value:
+ code: 20500
+ message: internal server error
+ more_info: https://www.twilio.com/docs/errors/20500
+ status: 500
diff --git a/src/main/resources/twilio-python/context.handlebars b/src/main/resources/twilio-python/context.handlebars
index b0f49be69..7481248ba 100644
--- a/src/main/resources/twilio-python/context.handlebars
+++ b/src/main/resources/twilio-python/context.handlebars
@@ -41,9 +41,15 @@ class {{apiName}}Context(InstanceContext):
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
- {{/vendorExtensions.successProduce}}
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
+ })
- payload = self._version.update(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers)
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
+
+ payload = self._version.update(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers{{#if queryParams}}, params=params{{/if}})
return {{instanceName}}(
self._version,
@@ -74,9 +80,15 @@ class {{apiName}}Context(InstanceContext):
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
- {{/vendorExtensions.successProduce}}
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
+ })
+
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
- payload = await self._version.update_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers)
+ payload = await self._version.update_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers{{#if queryParams}}, params=params{{/if}})
return {{instanceName}}(
self._version,
@@ -92,22 +104,27 @@ class {{apiName}}Context(InstanceContext):
:returns: The fetched {{instanceName}}
"""
- {{#if allParams}}
- data = values.of({ {{#allParams}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
- '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/allParams}}
+ {{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
})
- {{#allParams}}{{#if vendorExtensions.x-prefixed-collapsible-map}}data.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
- {{/if}}{{/allParams}}{{/if}}
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
headers = values.of({})
+ {{#allParams}}{{#isHeaderParam}}
+ {{^if required}}
+ if not ({{paramName}} is values.unset or (isinstance({{paramName}}, str) and not {{paramName}})):{{/if}}
+ headers['{{{baseName}}}'] = {{paramName}}
+ {{/isHeaderParam}}{{/allParams}}
{{#consumes}}
headers["Content-Type"] = "{{{mediaType}}}"
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
{{/vendorExtensions.successProduce}}
- payload = self._version.fetch(method='{{vendorExtensions.x-http-method}}', uri=self._uri {{#if allParams}}, params=data{{/if}} , headers=headers)
+ payload = self._version.fetch(method='{{vendorExtensions.x-http-method}}', uri=self._uri {{#if queryParams}}, params=params{{/if}} , headers=headers)
return {{instanceName}}(
self._version,
@@ -124,22 +141,27 @@ class {{apiName}}Context(InstanceContext):
:returns: The fetched {{instanceName}}
"""
- {{#if allParams}}
- data = values.of({ {{#allParams}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
- '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/allParams}}
+ {{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
})
- {{#allParams}}{{#if vendorExtensions.x-prefixed-collapsible-map}}data.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
- {{/if}}{{/allParams}}{{/if}}
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
headers = values.of({})
+ {{#allParams}}{{#isHeaderParam}}
+ {{^if required}}
+ if not ({{paramName}} is values.unset or (isinstance({{paramName}}, str) and not {{paramName}})):{{/if}}
+ headers['{{{baseName}}}'] = {{paramName}}
+ {{/isHeaderParam}}{{/allParams}}
{{#consumes}}
headers["Content-Type"] = "{{{mediaType}}}"
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
{{/vendorExtensions.successProduce}}
- payload = await self._version.fetch_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri {{#if allParams}}, params=data{{/if}}, headers=headers)
+ payload = await self._version.fetch_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri {{#if queryParams}}, params=params{{/if}}, headers=headers)
return {{instanceName}}(
self._version,
@@ -155,11 +177,11 @@ class {{apiName}}Context(InstanceContext):
{{#allParams}}:param {{paramName}}: {{{description}}}
{{/allParams}}
:returns: True if delete succeeds, False otherwise
- """{{#if allParams}}
- headers = values.of({{#allParams}}{'{{{baseName}}}': {{paramName}}, }{{/allParams}})
+ """{{#if headerParams}}
+ headers = values.of({{#allParams}}{{#isHeaderParam}}{'{{{baseName}}}': {{paramName}}, }{{/isHeaderParam}}{{/allParams}})
{{/if}}
- {{^if allParams}}
+ {{^if headerParams}}
headers = values.of({})
{{/if}}
{{#consumes}}
@@ -167,8 +189,14 @@ class {{apiName}}Context(InstanceContext):
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
- {{/vendorExtensions.successProduce}}
- return self._version.delete(method='{{vendorExtensions.x-http-method}}', uri=self._uri, headers=headers)
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
+ })
+
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
+ return self._version.delete(method='{{vendorExtensions.x-http-method}}', uri=self._uri, headers=headers{{#if queryParams}}, params=params{{/if}})
async def {{vendorExtensions.x-name-lower}}_async(self{{#allParams}}, {{paramName}}: {{#if required}}{{{dataType}}}{{else}}Union[{{{dataType}}}, object]=values.unset{{/if}}{{/allParams}}) -> bool:
"""
@@ -177,10 +205,10 @@ class {{apiName}}Context(InstanceContext):
{{#allParams}}:param {{paramName}}: {{{description}}}
{{/allParams}}
:returns: True if delete succeeds, False otherwise
- """{{#if allParams}}
- headers = values.of({{#allParams}}{'{{{baseName}}}': {{paramName}}, }{{/allParams}})
+ """{{#if headerParams}}
+ headers = values.of({{#allParams}}{{#isHeaderParam}}{'{{{baseName}}}': {{paramName}}, }{{/isHeaderParam}}{{/allParams}})
{{/if}}
- {{^if allParams}}
+ {{^if headerParams}}
headers = values.of({})
{{/if}}
{{#consumes}}
@@ -188,8 +216,14 @@ class {{apiName}}Context(InstanceContext):
{{/consumes}}
{{#vendorExtensions.successProduce}}
headers["Accept"] = "{{{mediaType}}}"
- {{/vendorExtensions.successProduce}}
- return await self._version.delete_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, headers=headers)
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
+ })
+
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
+ return await self._version.delete_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, headers=headers{{#if queryParams}}, params=params{{/if}})
{{/vendorExtensions.x-twilio.ignoreOperation}}{{/vendorExtensions.x-is-delete-operation}}{{#vendorExtensions.x-is-create-operation}}{{^vendorExtensions.x-twilio.ignoreOperation}}
def {{vendorExtensions.x-name-lower}}(self{{#allParams}}, {{paramName}}: {{#if required}}{{{dataType}}}{{else}}Union[{{{dataType}}}, object]=values.unset{{/if}}{{/allParams}}) -> {{instanceName}}:
"""
@@ -199,11 +233,29 @@ class {{apiName}}Context(InstanceContext):
:returns: The created {{instanceName}}
"""
- data = values.of({ {{#allParams}}
- '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/allParams}}
+ {{#bodyParam}}data = {{paramName}}.to_dict(){{/bodyParam}}
+ {{^bodyParam}}data = values.of({ {{#allParams}}{{#isFormParam}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/isFormParam}}{{/allParams}}
+ }){{/bodyParam}}
+ headers = values.of({})
+ {{#allParams}}{{#isHeaderParam}}
+ {{^if required}}
+ if not ({{paramName}} is values.unset or (isinstance({{paramName}}, str) and not {{paramName}})):{{/if}}
+ headers['{{{baseName}}}'] = {{paramName}}{{/isHeaderParam}}{{/allParams}}
+ {{#consumes}}
+ headers["Content-Type"] = "{{{mediaType}}}"
+ {{/consumes}}
+ {{#vendorExtensions.successProduce}}
+ headers["Accept"] = "{{{mediaType}}}"
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
})
- payload = self._version.create(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data)
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
+
+ payload = self._version.create(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers{{#if queryParams}}, params=params{{/if}})
return {{instanceName}}(
self._version,
@@ -219,11 +271,29 @@ class {{apiName}}Context(InstanceContext):
:returns: The created {{instanceName}}
"""
- data = values.of({ {{#allParams}}
- '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/allParams}}
+ {{#bodyParam}}data = {{paramName}}.to_dict(){{/bodyParam}}
+ {{^bodyParam}}data = values.of({ {{#allParams}}{{#isFormParam}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/isFormParam}}{{/allParams}}
+ }){{/bodyParam}}
+ headers = values.of({})
+ {{#allParams}}{{#isHeaderParam}}
+ {{^if required}}
+ if not ({{paramName}} is values.unset or (isinstance({{paramName}}, str) and not {{paramName}})):{{/if}}
+ headers['{{{baseName}}}'] = {{paramName}}{{/isHeaderParam}}{{/allParams}}
+ {{#consumes}}
+ headers["Content-Type"] = "{{{mediaType}}}"
+ {{/consumes}}
+ {{#vendorExtensions.successProduce}}
+ headers["Accept"] = "{{{mediaType}}}"
+ {{/vendorExtensions.successProduce}}{{#if queryParams}}
+ params = values.of({ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}{{else}}
+ '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/if}}{{/isQueryParam}}{{/allParams}}
})
- payload = await self._version.create_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data)
+ {{#allParams}}{{#isQueryParam}}{{#if vendorExtensions.x-prefixed-collapsible-map}}params.update({{vendorExtensions.x-serialize}}({{paramName}}, '{{vendorExtensions.x-prefixed-collapsible-map}}'))
+ {{/if}}{{/isQueryParam}}{{/allParams}}{{/if}}
+
+ payload = await self._version.create_async(method='{{vendorExtensions.x-http-method}}', uri=self._uri, data=data, headers=headers{{#if queryParams}}, params=params{{/if}})
return {{instanceName}}(
self._version,