コード例 #1
0
ファイル: create.py プロジェクト: PrateekKhatri/gcloud_cli
 def Run(self, args):
   """Runs the create command."""
   parent_name = util.GetParent(args)
   categories = util.GetNotificationCategories(
       args, contacts.GetContactNotificationCategoryEnum())
   client = contacts.ContactsClient()
   return client.Create(parent_name, args.email, categories, args.language)
コード例 #2
0
 def Run(self, args):
     """Runs the list command."""
     parent_name = util.GetParent(args)
     client = contacts.ContactsClient()
     return client.List(parent_name,
                        limit=args.limit,
                        page_size=args.page_size)
コード例 #3
0
    def Run(self, args):
        """Runs the compute contacts command."""
        parent_name = util.GetParent(args)
        notification_category_enum = self._GetNotificationCategoryEnumByParentType(
            parent_name)
        categories = util.GetNotificationCategories(
            args, notification_category_enum)

        client = contacts.ContactsClient()
        return client.Compute(parent_name,
                              categories,
                              limit=args.limit,
                              page_size=args.page_size)