summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHentioe <me@bluerain.io>2020-10-20 15:41:18 +0800
committerHentioe <me@bluerain.io>2020-10-20 15:41:18 +0800
commitfff3e55d01630293dbae0f4c427e4e7f88ad1fc8 (patch)
tree437f2543a9cd76c8071af5f709afa295a9ae87c0 /lib
parentAdd deps (diff)
Add some models
Diffstat (limited to 'lib')
-rw-r--r--lib/model/virtual_machine.ex21
-rw-r--r--lib/model/virtual_machine_list_result.ex17
2 files changed, 38 insertions, 0 deletions
diff --git a/lib/model/virtual_machine.ex b/lib/model/virtual_machine.ex
new file mode 100644
index 0000000..2886c14
--- /dev/null
+++ b/lib/model/virtual_machine.ex
@@ -0,0 +1,21 @@
+defmodule AzureEx.Model.VirtualMachine do
+ @moduledoc """
+ A struct representing a virtual machine.
+ """
+ use TypedStruct
+
+ typedstruct do
+ @typedoc "Describes a Virtual Machine."
+
+ # Resource Id.
+ field :id, String.t()
+ # Resource location.
+ field :location, String.t()
+ # Resource name.
+ field :name, String.t()
+ # Resource type.
+ field :type, String.t()
+ # The virtual machine zones.
+ field :zones, [String.t()]
+ end
+end
diff --git a/lib/model/virtual_machine_list_result.ex b/lib/model/virtual_machine_list_result.ex
new file mode 100644
index 0000000..87d6475
--- /dev/null
+++ b/lib/model/virtual_machine_list_result.ex
@@ -0,0 +1,17 @@
+defmodule AzureEx.Model.VirtualMachineListResult do
+ @moduledoc """
+ A struct representing a list virtual machine operation response.
+ """
+
+ use TypedStruct
+
+ typedstruct do
+ @typedoc "The List Virtual Machine operation response."
+
+ # The URI to fetch the next page of VMs.
+ # Call ListNext() with this URI to fetch the next page of Virtual Machines.
+ field :next_link, String.t()
+ # The list of virtual machines.
+ field :value, [AzureEx.Model.VirtualMachine.t()]
+ end
+end