From 76a30929861eb90970f790331413e7a9e77de15f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 23 Jan 2025 14:40:23 +0000
Subject: [PATCH] feat(api): api update
---
api.md | 2 ++
vms/osimage.go | 26 ++++++++++++++++++++++++++
vms/vm.go | 4 +++-
3 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 vms/osimage.go
diff --git a/api.md b/api.md
index ce80cad..e72e6d1 100644
--- a/api.md
+++ b/api.md
@@ -30,6 +30,8 @@ Methods:
- client.VMs.Delete(ctx context.Context, vmID string) (operations.Operation, error)
- client.VMs.Get(ctx context.Context, vmID string) (vms.VM, error)
+## OsImages
+
# VPCs
Response Types:
diff --git a/vms/osimage.go b/vms/osimage.go
new file mode 100644
index 0000000..7ab1852
--- /dev/null
+++ b/vms/osimage.go
@@ -0,0 +1,26 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package vms
+
+import (
+ "github.com/nirvana-labs/nirvana-go/option"
+)
+
+// OsImageService contains methods and other services that help with interacting
+// with the Nirvana Labs API.
+//
+// Note, unlike clients, this service does not read variables from the environment
+// automatically. You should not instantiate this service directly, and instead use
+// the [NewOsImageService] method instead.
+type OsImageService struct {
+ Options []option.RequestOption
+}
+
+// NewOsImageService generates a new service that applies the given options to each
+// request. These options are applied after the parent client's options (if there
+// is one), and before any request-specific options.
+func NewOsImageService(opts ...option.RequestOption) (r *OsImageService) {
+ r = &OsImageService{}
+ r.Options = opts
+ return
+}
diff --git a/vms/vm.go b/vms/vm.go
index 6d7fdee..bcb5270 100644
--- a/vms/vm.go
+++ b/vms/vm.go
@@ -25,7 +25,8 @@ import (
// automatically. You should not instantiate this service directly, and instead use
// the [NewVMService] method instead.
type VMService struct {
- Options []option.RequestOption
+ Options []option.RequestOption
+ OsImages *OsImageService
}
// NewVMService generates a new service that applies the given options to each
@@ -34,6 +35,7 @@ type VMService struct {
func NewVMService(opts ...option.RequestOption) (r *VMService) {
r = &VMService{}
r.Options = opts
+ r.OsImages = NewOsImageService(opts...)
return
}