Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate init files appropriately #649

Merged
merged 4 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions twilio/rest/accounts/v1/credential.py

This file was deleted.

139 changes: 29 additions & 110 deletions twilio/rest/accounts/v1/credential/__init__.py
Original file line number Diff line number Diff line change
@@ -1,130 +1,49 @@
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
This code was generated by
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \

from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page import Page
from twilio.rest.accounts.v1.credential.aws import AwsList
from twilio.rest.accounts.v1.credential.public_key import PublicKeyList


class CredentialList(ListResource):

def __init__(self, version):
"""
Initialize the CredentialList

:param Version version: Version that contains the resource

:returns: twilio.rest.accounts.v1.credential.CredentialList
:rtype: twilio.rest.accounts.v1.credential.CredentialList
"""
super(CredentialList, self).__init__(version)

# Path Solution
self._solution = {}

# Components
self._public_key = None
self._aws = None
Twilio - Accounts
This is the public Twilio REST API.

@property
def public_key(self):
"""
Access the public_key

:returns: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
"""
if self._public_key is None:
self._public_key = PublicKeyList(self._version, )
return self._public_key

@property
def aws(self):
"""
Access the aws

:returns: twilio.rest.accounts.v1.credential.aws.AwsList
:rtype: twilio.rest.accounts.v1.credential.aws.AwsList
"""
if self._aws is None:
self._aws = AwsList(self._version, )
return self._aws
NOTE: This class is auto generated by OpenAPI Generator.
https://openapi-generator.tech
Do not edit the class manually.
"""

def __repr__(self):
"""
Provide a friendly representation

:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Accounts.V1.CredentialList>'
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import 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

# from twilio.rest.credential.aws import AwsListInstancefrom twilio.rest.credential.public_key import PublicKeyListInstance

class CredentialPage(Page):

def __init__(self, version, response, solution):
"""
Initialize the CredentialPage

:param Version version: Version that contains the resource
:param Response response: Response from the API

:returns: twilio.rest.accounts.v1.credential.CredentialPage
:rtype: twilio.rest.accounts.v1.credential.CredentialPage
"""
super(CredentialPage, self).__init__(version, response)
class CredentialListInstance(ListResource):
def __init__(self, version: Version):
# TODO: needs autogenerated docs
super().__init__(version)

# Path Solution
self._solution = solution

def get_instance(self, payload):
"""
Build an instance of CredentialInstance

:param dict payload: Payload response from the API

:returns: twilio.rest.accounts.v1.credential.CredentialInstance
:rtype: twilio.rest.accounts.v1.credential.CredentialInstance
"""
return CredentialInstance(self._version, payload, )
self._solution = { }
self._uri = '/Credentials'

self._aws = None
self._public_key = None


def __repr__(self):
"""
Provide a friendly representation

:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Accounts.V1.CredentialPage>'

return '<Twilio.Api.V1.CredentialListInstance>'

class CredentialInstance(InstanceResource):

def __init__(self, version, payload):
"""
Initialize the CredentialInstance

:returns: twilio.rest.accounts.v1.credential.CredentialInstance
:rtype: twilio.rest.accounts.v1.credential.CredentialInstance
"""
super(CredentialInstance, self).__init__(version)

# Context
self._context = None
self._solution = {}

def __repr__(self):
"""
Provide a friendly representation

:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Accounts.V1.CredentialInstance>'
Loading