1package containerinstance
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"encoding/json"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/date"
24	"github.com/Azure/go-autorest/autorest/to"
25	"net/http"
26)
27
28// ContainerGroupNetworkProtocol enumerates the values for container group network protocol.
29type ContainerGroupNetworkProtocol string
30
31const (
32	// TCP ...
33	TCP ContainerGroupNetworkProtocol = "TCP"
34	// UDP ...
35	UDP ContainerGroupNetworkProtocol = "UDP"
36)
37
38// PossibleContainerGroupNetworkProtocolValues returns an array of possible values for the ContainerGroupNetworkProtocol const type.
39func PossibleContainerGroupNetworkProtocolValues() []ContainerGroupNetworkProtocol {
40	return []ContainerGroupNetworkProtocol{TCP, UDP}
41}
42
43// ContainerGroupRestartPolicy enumerates the values for container group restart policy.
44type ContainerGroupRestartPolicy string
45
46const (
47	// Always ...
48	Always ContainerGroupRestartPolicy = "Always"
49	// Never ...
50	Never ContainerGroupRestartPolicy = "Never"
51	// OnFailure ...
52	OnFailure ContainerGroupRestartPolicy = "OnFailure"
53)
54
55// PossibleContainerGroupRestartPolicyValues returns an array of possible values for the ContainerGroupRestartPolicy const type.
56func PossibleContainerGroupRestartPolicyValues() []ContainerGroupRestartPolicy {
57	return []ContainerGroupRestartPolicy{Always, Never, OnFailure}
58}
59
60// ContainerNetworkProtocol enumerates the values for container network protocol.
61type ContainerNetworkProtocol string
62
63const (
64	// ContainerNetworkProtocolTCP ...
65	ContainerNetworkProtocolTCP ContainerNetworkProtocol = "TCP"
66	// ContainerNetworkProtocolUDP ...
67	ContainerNetworkProtocolUDP ContainerNetworkProtocol = "UDP"
68)
69
70// PossibleContainerNetworkProtocolValues returns an array of possible values for the ContainerNetworkProtocol const type.
71func PossibleContainerNetworkProtocolValues() []ContainerNetworkProtocol {
72	return []ContainerNetworkProtocol{ContainerNetworkProtocolTCP, ContainerNetworkProtocolUDP}
73}
74
75// OperatingSystemTypes enumerates the values for operating system types.
76type OperatingSystemTypes string
77
78const (
79	// Linux ...
80	Linux OperatingSystemTypes = "Linux"
81	// Windows ...
82	Windows OperatingSystemTypes = "Windows"
83)
84
85// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
86func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
87	return []OperatingSystemTypes{Linux, Windows}
88}
89
90// OperationsOrigin enumerates the values for operations origin.
91type OperationsOrigin string
92
93const (
94	// System ...
95	System OperationsOrigin = "System"
96	// User ...
97	User OperationsOrigin = "User"
98)
99
100// PossibleOperationsOriginValues returns an array of possible values for the OperationsOrigin const type.
101func PossibleOperationsOriginValues() []OperationsOrigin {
102	return []OperationsOrigin{System, User}
103}
104
105// AzureFileVolume the properties of the Azure File volume. Azure File shares are mounted as volumes.
106type AzureFileVolume struct {
107	// ShareName - The name of the Azure File share to be mounted as a volume.
108	ShareName *string `json:"shareName,omitempty"`
109	// ReadOnly - The flag indicating whether the Azure File shared mounted as a volume is read-only.
110	ReadOnly *bool `json:"readOnly,omitempty"`
111	// StorageAccountName - The name of the storage account that contains the Azure File share.
112	StorageAccountName *string `json:"storageAccountName,omitempty"`
113	// StorageAccountKey - The storage account access key used to access the Azure File share.
114	StorageAccountKey *string `json:"storageAccountKey,omitempty"`
115}
116
117// Container a container instance.
118type Container struct {
119	// Name - The user-provided name of the container instance.
120	Name *string `json:"name,omitempty"`
121	// ContainerProperties - The properties of the container instance.
122	*ContainerProperties `json:"properties,omitempty"`
123}
124
125// MarshalJSON is the custom marshaler for Container.
126func (c Container) MarshalJSON() ([]byte, error) {
127	objectMap := make(map[string]interface{})
128	if c.Name != nil {
129		objectMap["name"] = c.Name
130	}
131	if c.ContainerProperties != nil {
132		objectMap["properties"] = c.ContainerProperties
133	}
134	return json.Marshal(objectMap)
135}
136
137// UnmarshalJSON is the custom unmarshaler for Container struct.
138func (c *Container) UnmarshalJSON(body []byte) error {
139	var m map[string]*json.RawMessage
140	err := json.Unmarshal(body, &m)
141	if err != nil {
142		return err
143	}
144	for k, v := range m {
145		switch k {
146		case "name":
147			if v != nil {
148				var name string
149				err = json.Unmarshal(*v, &name)
150				if err != nil {
151					return err
152				}
153				c.Name = &name
154			}
155		case "properties":
156			if v != nil {
157				var containerProperties ContainerProperties
158				err = json.Unmarshal(*v, &containerProperties)
159				if err != nil {
160					return err
161				}
162				c.ContainerProperties = &containerProperties
163			}
164		}
165	}
166
167	return nil
168}
169
170// ContainerGroup a container group.
171type ContainerGroup struct {
172	autorest.Response         `json:"-"`
173	*ContainerGroupProperties `json:"properties,omitempty"`
174	// ID - The resource id.
175	ID *string `json:"id,omitempty"`
176	// Name - The resource name.
177	Name *string `json:"name,omitempty"`
178	// Type - The resource type.
179	Type *string `json:"type,omitempty"`
180	// Location - The resource location.
181	Location *string `json:"location,omitempty"`
182	// Tags - The resource tags.
183	Tags map[string]*string `json:"tags"`
184}
185
186// MarshalJSON is the custom marshaler for ContainerGroup.
187func (cg ContainerGroup) MarshalJSON() ([]byte, error) {
188	objectMap := make(map[string]interface{})
189	if cg.ContainerGroupProperties != nil {
190		objectMap["properties"] = cg.ContainerGroupProperties
191	}
192	if cg.ID != nil {
193		objectMap["id"] = cg.ID
194	}
195	if cg.Name != nil {
196		objectMap["name"] = cg.Name
197	}
198	if cg.Type != nil {
199		objectMap["type"] = cg.Type
200	}
201	if cg.Location != nil {
202		objectMap["location"] = cg.Location
203	}
204	if cg.Tags != nil {
205		objectMap["tags"] = cg.Tags
206	}
207	return json.Marshal(objectMap)
208}
209
210// UnmarshalJSON is the custom unmarshaler for ContainerGroup struct.
211func (cg *ContainerGroup) UnmarshalJSON(body []byte) error {
212	var m map[string]*json.RawMessage
213	err := json.Unmarshal(body, &m)
214	if err != nil {
215		return err
216	}
217	for k, v := range m {
218		switch k {
219		case "properties":
220			if v != nil {
221				var containerGroupProperties ContainerGroupProperties
222				err = json.Unmarshal(*v, &containerGroupProperties)
223				if err != nil {
224					return err
225				}
226				cg.ContainerGroupProperties = &containerGroupProperties
227			}
228		case "id":
229			if v != nil {
230				var ID string
231				err = json.Unmarshal(*v, &ID)
232				if err != nil {
233					return err
234				}
235				cg.ID = &ID
236			}
237		case "name":
238			if v != nil {
239				var name string
240				err = json.Unmarshal(*v, &name)
241				if err != nil {
242					return err
243				}
244				cg.Name = &name
245			}
246		case "type":
247			if v != nil {
248				var typeVar string
249				err = json.Unmarshal(*v, &typeVar)
250				if err != nil {
251					return err
252				}
253				cg.Type = &typeVar
254			}
255		case "location":
256			if v != nil {
257				var location string
258				err = json.Unmarshal(*v, &location)
259				if err != nil {
260					return err
261				}
262				cg.Location = &location
263			}
264		case "tags":
265			if v != nil {
266				var tags map[string]*string
267				err = json.Unmarshal(*v, &tags)
268				if err != nil {
269					return err
270				}
271				cg.Tags = tags
272			}
273		}
274	}
275
276	return nil
277}
278
279// ContainerGroupListResult the container group list response that contains the container group properties.
280type ContainerGroupListResult struct {
281	autorest.Response `json:"-"`
282	// Value - The list of container groups.
283	Value *[]ContainerGroup `json:"value,omitempty"`
284	// NextLink - The URI to fetch the next page of container groups.
285	NextLink *string `json:"nextLink,omitempty"`
286}
287
288// ContainerGroupListResultIterator provides access to a complete listing of ContainerGroup values.
289type ContainerGroupListResultIterator struct {
290	i    int
291	page ContainerGroupListResultPage
292}
293
294// Next advances to the next value.  If there was an error making
295// the request the iterator does not advance and the error is returned.
296func (iter *ContainerGroupListResultIterator) Next() error {
297	iter.i++
298	if iter.i < len(iter.page.Values()) {
299		return nil
300	}
301	err := iter.page.Next()
302	if err != nil {
303		iter.i--
304		return err
305	}
306	iter.i = 0
307	return nil
308}
309
310// NotDone returns true if the enumeration should be started or is not yet complete.
311func (iter ContainerGroupListResultIterator) NotDone() bool {
312	return iter.page.NotDone() && iter.i < len(iter.page.Values())
313}
314
315// Response returns the raw server response from the last page request.
316func (iter ContainerGroupListResultIterator) Response() ContainerGroupListResult {
317	return iter.page.Response()
318}
319
320// Value returns the current value or a zero-initialized value if the
321// iterator has advanced beyond the end of the collection.
322func (iter ContainerGroupListResultIterator) Value() ContainerGroup {
323	if !iter.page.NotDone() {
324		return ContainerGroup{}
325	}
326	return iter.page.Values()[iter.i]
327}
328
329// IsEmpty returns true if the ListResult contains no values.
330func (cglr ContainerGroupListResult) IsEmpty() bool {
331	return cglr.Value == nil || len(*cglr.Value) == 0
332}
333
334// containerGroupListResultPreparer prepares a request to retrieve the next set of results.
335// It returns nil if no more results exist.
336func (cglr ContainerGroupListResult) containerGroupListResultPreparer() (*http.Request, error) {
337	if cglr.NextLink == nil || len(to.String(cglr.NextLink)) < 1 {
338		return nil, nil
339	}
340	return autorest.Prepare(&http.Request{},
341		autorest.AsJSON(),
342		autorest.AsGet(),
343		autorest.WithBaseURL(to.String(cglr.NextLink)))
344}
345
346// ContainerGroupListResultPage contains a page of ContainerGroup values.
347type ContainerGroupListResultPage struct {
348	fn   func(ContainerGroupListResult) (ContainerGroupListResult, error)
349	cglr ContainerGroupListResult
350}
351
352// Next advances to the next page of values.  If there was an error making
353// the request the page does not advance and the error is returned.
354func (page *ContainerGroupListResultPage) Next() error {
355	next, err := page.fn(page.cglr)
356	if err != nil {
357		return err
358	}
359	page.cglr = next
360	return nil
361}
362
363// NotDone returns true if the page enumeration should be started or is not yet complete.
364func (page ContainerGroupListResultPage) NotDone() bool {
365	return !page.cglr.IsEmpty()
366}
367
368// Response returns the raw server response from the last page request.
369func (page ContainerGroupListResultPage) Response() ContainerGroupListResult {
370	return page.cglr
371}
372
373// Values returns the slice of values for the current page or nil if there are no values.
374func (page ContainerGroupListResultPage) Values() []ContainerGroup {
375	if page.cglr.IsEmpty() {
376		return nil
377	}
378	return *page.cglr.Value
379}
380
381// ContainerGroupProperties ...
382type ContainerGroupProperties struct {
383	// ProvisioningState - The provisioning state of the container group. This only appears in the response.
384	ProvisioningState *string `json:"provisioningState,omitempty"`
385	// Containers - The containers within the container group.
386	Containers *[]Container `json:"containers,omitempty"`
387	// ImageRegistryCredentials - The image registry credentials by which the container group is created from.
388	ImageRegistryCredentials *[]ImageRegistryCredential `json:"imageRegistryCredentials,omitempty"`
389	// RestartPolicy - Restart policy for all containers within the container group.
390	// - `Always` Always restart
391	// - `OnFailure` Restart on failure
392	// - `Never` Never restart
393	// . Possible values include: 'Always', 'OnFailure', 'Never'
394	RestartPolicy ContainerGroupRestartPolicy `json:"restartPolicy,omitempty"`
395	// IPAddress - The IP address type of the container group.
396	IPAddress *IPAddress `json:"ipAddress,omitempty"`
397	// OsType - The operating system type required by the containers in the container group. Possible values include: 'Windows', 'Linux'
398	OsType OperatingSystemTypes `json:"osType,omitempty"`
399	// Volumes - The list of volumes that can be mounted by containers in this container group.
400	Volumes *[]Volume `json:"volumes,omitempty"`
401	// InstanceView - The instance view of the container group. Only valid in response.
402	InstanceView *ContainerGroupPropertiesInstanceView `json:"instanceView,omitempty"`
403}
404
405// ContainerGroupPropertiesInstanceView the instance view of the container group. Only valid in response.
406type ContainerGroupPropertiesInstanceView struct {
407	// Events - The events of this container group.
408	Events *[]Event `json:"events,omitempty"`
409	// State - The state of the container group. Only valid in response.
410	State *string `json:"state,omitempty"`
411}
412
413// ContainerPort the port exposed on the container instance.
414type ContainerPort struct {
415	// Protocol - The protocol associated with the port. Possible values include: 'ContainerNetworkProtocolTCP', 'ContainerNetworkProtocolUDP'
416	Protocol ContainerNetworkProtocol `json:"protocol,omitempty"`
417	// Port - The port number exposed within the container group.
418	Port *int32 `json:"port,omitempty"`
419}
420
421// ContainerProperties the container instance properties.
422type ContainerProperties struct {
423	// Image - The name of the image used to create the container instance.
424	Image *string `json:"image,omitempty"`
425	// Command - The commands to execute within the container instance in exec form.
426	Command *[]string `json:"command,omitempty"`
427	// Ports - The exposed ports on the container instance.
428	Ports *[]ContainerPort `json:"ports,omitempty"`
429	// EnvironmentVariables - The environment variables to set in the container instance.
430	EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"`
431	// InstanceView - The instance view of the container instance. Only valid in response.
432	InstanceView *ContainerPropertiesInstanceView `json:"instanceView,omitempty"`
433	// Resources - The resource requirements of the container instance.
434	Resources *ResourceRequirements `json:"resources,omitempty"`
435	// VolumeMounts - The volume mounts available to the container instance.
436	VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"`
437}
438
439// ContainerPropertiesInstanceView the instance view of the container instance. Only valid in response.
440type ContainerPropertiesInstanceView struct {
441	// RestartCount - The number of times that the container instance has been restarted.
442	RestartCount *int32 `json:"restartCount,omitempty"`
443	// CurrentState - Current container instance state.
444	CurrentState *ContainerState `json:"currentState,omitempty"`
445	// PreviousState - Previous container instance state.
446	PreviousState *ContainerState `json:"previousState,omitempty"`
447	// Events - The events of the container instance.
448	Events *[]Event `json:"events,omitempty"`
449}
450
451// ContainerState the container instance state.
452type ContainerState struct {
453	// State - The state of the container instance.
454	State *string `json:"state,omitempty"`
455	// StartTime - The date-time when the container instance state started.
456	StartTime *date.Time `json:"startTime,omitempty"`
457	// ExitCode - The container instance exit codes correspond to those from the `docker run` command.
458	ExitCode *int32 `json:"exitCode,omitempty"`
459	// FinishTime - The date-time when the container instance state finished.
460	FinishTime *date.Time `json:"finishTime,omitempty"`
461	// DetailStatus - The human-readable status of the container instance state.
462	DetailStatus *string `json:"detailStatus,omitempty"`
463}
464
465// EnvironmentVariable the environment variable to set within the container instance.
466type EnvironmentVariable struct {
467	// Name - The name of the environment variable.
468	Name *string `json:"name,omitempty"`
469	// Value - The value of the environment variable.
470	Value *string `json:"value,omitempty"`
471}
472
473// Event a container group or container instance event.
474type Event struct {
475	// Count - The count of the event.
476	Count *int32 `json:"count,omitempty"`
477	// FirstTimestamp - The date-time of the earliest logged event.
478	FirstTimestamp *date.Time `json:"firstTimestamp,omitempty"`
479	// LastTimestamp - The date-time of the latest logged event.
480	LastTimestamp *date.Time `json:"lastTimestamp,omitempty"`
481	// Name - The event name.
482	Name *string `json:"name,omitempty"`
483	// Message - The event message.
484	Message *string `json:"message,omitempty"`
485	// Type - The event type.
486	Type *string `json:"type,omitempty"`
487}
488
489// GitRepoVolume represents a volume that is populated with the contents of a git repository
490type GitRepoVolume struct {
491	// Directory - Target directory name. Must not contain or start with '..'.  If '.' is supplied, the volume directory will be the git repository.  Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
492	Directory *string `json:"directory,omitempty"`
493	// Repository - Repository URL
494	Repository *string `json:"repository,omitempty"`
495	// Revision - Commit hash for the specified revision.
496	Revision *string `json:"revision,omitempty"`
497}
498
499// ImageRegistryCredential image registry credential.
500type ImageRegistryCredential struct {
501	// Server - The Docker image registry server without a protocol such as "http" and "https".
502	Server *string `json:"server,omitempty"`
503	// Username - The username for the private registry.
504	Username *string `json:"username,omitempty"`
505	// Password - The password for the private registry.
506	Password *string `json:"password,omitempty"`
507}
508
509// IPAddress IP address for the container group.
510type IPAddress struct {
511	// Ports - The list of ports exposed on the container group.
512	Ports *[]Port `json:"ports,omitempty"`
513	// Type - Specifies if the IP is exposed to the public internet.
514	Type *string `json:"type,omitempty"`
515	// IP - The IP exposed to the public internet.
516	IP *string `json:"ip,omitempty"`
517}
518
519// Logs the logs.
520type Logs struct {
521	autorest.Response `json:"-"`
522	// Content - The content of the log.
523	Content *string `json:"content,omitempty"`
524}
525
526// Operation an operation for Azure Container Instance service.
527type Operation struct {
528	// Name - The name of the operation.
529	Name *string `json:"name,omitempty"`
530	// Display - The display information of the operation.
531	Display *OperationDisplay `json:"display,omitempty"`
532	// Origin - The intended executor of the operation. Possible values include: 'User', 'System'
533	Origin OperationsOrigin `json:"origin,omitempty"`
534}
535
536// OperationDisplay the display information of the operation.
537type OperationDisplay struct {
538	// Provider - The name of the provider of the operation.
539	Provider *string `json:"provider,omitempty"`
540	// Resource - The name of the resource type of the operation.
541	Resource *string `json:"resource,omitempty"`
542	// Operation - The friendly name of the operation.
543	Operation *string `json:"operation,omitempty"`
544	// Description - The description of the operation.
545	Description *string `json:"description,omitempty"`
546}
547
548// OperationListResult the operation list response that contains all operations for Azure Container Instance
549// service.
550type OperationListResult struct {
551	autorest.Response `json:"-"`
552	// Value - The list of operations.
553	Value *[]Operation `json:"value,omitempty"`
554	// NextLink - The URI to fetch the next page of operations.
555	NextLink *string `json:"nextLink,omitempty"`
556}
557
558// Port the port exposed on the container group.
559type Port struct {
560	// Protocol - The protocol associated with the port. Possible values include: 'TCP', 'UDP'
561	Protocol ContainerGroupNetworkProtocol `json:"protocol,omitempty"`
562	// Port - The port number.
563	Port *int32 `json:"port,omitempty"`
564}
565
566// Resource the Resource model definition.
567type Resource struct {
568	// ID - The resource id.
569	ID *string `json:"id,omitempty"`
570	// Name - The resource name.
571	Name *string `json:"name,omitempty"`
572	// Type - The resource type.
573	Type *string `json:"type,omitempty"`
574	// Location - The resource location.
575	Location *string `json:"location,omitempty"`
576	// Tags - The resource tags.
577	Tags map[string]*string `json:"tags"`
578}
579
580// MarshalJSON is the custom marshaler for Resource.
581func (r Resource) MarshalJSON() ([]byte, error) {
582	objectMap := make(map[string]interface{})
583	if r.ID != nil {
584		objectMap["id"] = r.ID
585	}
586	if r.Name != nil {
587		objectMap["name"] = r.Name
588	}
589	if r.Type != nil {
590		objectMap["type"] = r.Type
591	}
592	if r.Location != nil {
593		objectMap["location"] = r.Location
594	}
595	if r.Tags != nil {
596		objectMap["tags"] = r.Tags
597	}
598	return json.Marshal(objectMap)
599}
600
601// ResourceLimits the resource limits.
602type ResourceLimits struct {
603	// MemoryInGB - The memory limit in GB of this container instance.
604	MemoryInGB *float64 `json:"memoryInGB,omitempty"`
605	// CPU - The CPU limit of this container instance.
606	CPU *float64 `json:"cpu,omitempty"`
607}
608
609// ResourceRequests the resource requests.
610type ResourceRequests struct {
611	// MemoryInGB - The memory request in GB of this container instance.
612	MemoryInGB *float64 `json:"memoryInGB,omitempty"`
613	// CPU - The CPU request of this container instance.
614	CPU *float64 `json:"cpu,omitempty"`
615}
616
617// ResourceRequirements the resource requirements.
618type ResourceRequirements struct {
619	// Requests - The resource requests of this container instance.
620	Requests *ResourceRequests `json:"requests,omitempty"`
621	// Limits - The resource limits of this container instance.
622	Limits *ResourceLimits `json:"limits,omitempty"`
623}
624
625// Usage a single usage result
626type Usage struct {
627	// Unit - Unit of the usage result
628	Unit *string `json:"unit,omitempty"`
629	// CurrentValue - The current usage of the resource
630	CurrentValue *int32 `json:"currentValue,omitempty"`
631	// Limit - The maximum permitted usage of the resource.
632	Limit *int32 `json:"limit,omitempty"`
633	// Name - The name object of the resource
634	Name *UsageName `json:"name,omitempty"`
635}
636
637// UsageListResult the response containing the usage data
638type UsageListResult struct {
639	autorest.Response `json:"-"`
640	Value             *[]Usage `json:"value,omitempty"`
641}
642
643// UsageName the name object of the resource
644type UsageName struct {
645	// Value - The name of the resource
646	Value *string `json:"value,omitempty"`
647	// LocalizedValue - The localized name of the resource
648	LocalizedValue *string `json:"localizedValue,omitempty"`
649}
650
651// Volume the properties of the volume.
652type Volume struct {
653	// Name - The name of the volume.
654	Name *string `json:"name,omitempty"`
655	// AzureFile - The Azure File volume.
656	AzureFile *AzureFileVolume `json:"azureFile,omitempty"`
657	// EmptyDir - The empty directory volume.
658	EmptyDir interface{} `json:"emptyDir,omitempty"`
659	// Secret - The secret volume.
660	Secret map[string]*string `json:"secret"`
661	// GitRepo - The git repo volume.
662	GitRepo *GitRepoVolume `json:"gitRepo,omitempty"`
663}
664
665// MarshalJSON is the custom marshaler for Volume.
666func (vVar Volume) MarshalJSON() ([]byte, error) {
667	objectMap := make(map[string]interface{})
668	if vVar.Name != nil {
669		objectMap["name"] = vVar.Name
670	}
671	if vVar.AzureFile != nil {
672		objectMap["azureFile"] = vVar.AzureFile
673	}
674	objectMap["emptyDir"] = vVar.EmptyDir
675	if vVar.Secret != nil {
676		objectMap["secret"] = vVar.Secret
677	}
678	if vVar.GitRepo != nil {
679		objectMap["gitRepo"] = vVar.GitRepo
680	}
681	return json.Marshal(objectMap)
682}
683
684// VolumeMount the properties of the volume mount.
685type VolumeMount struct {
686	// Name - The name of the volume mount.
687	Name *string `json:"name,omitempty"`
688	// MountPath - The path within the container where the volume should be mounted. Must not contain colon (:).
689	MountPath *string `json:"mountPath,omitempty"`
690	// ReadOnly - The flag indicating whether the volume mount is read-only.
691	ReadOnly *bool `json:"readOnly,omitempty"`
692}
693