@@ -138,23 +138,23 @@ impl Container {
138138 }
139139
140140 /// Get arguments of container.
141- pub fn args ( & self ) -> & Vec < String > {
142- & self . 0 . args
141+ pub fn args ( & self ) -> Option < & Vec < String > > {
142+ self . 0 . args . as_ref ( )
143143 }
144144
145145 /// Get command of container.
146- pub fn command ( & self ) -> & Vec < String > {
147- & self . 0 . command
146+ pub fn command ( & self ) -> Option < & Vec < String > > {
147+ self . 0 . command . as_ref ( )
148148 }
149149
150150 /// Get environment of container.
151- pub fn env ( & self ) -> & Vec < k8s_openapi:: api:: core:: v1:: EnvVar > {
152- & self . 0 . env
151+ pub fn env ( & self ) -> Option < & Vec < k8s_openapi:: api:: core:: v1:: EnvVar > > {
152+ self . 0 . env . as_ref ( )
153153 }
154154
155155 /// Get environment of container.
156- pub fn env_from ( & self ) -> & Vec < k8s_openapi:: api:: core:: v1:: EnvFromSource > {
157- & self . 0 . env_from
156+ pub fn env_from ( & self ) -> Option < & Vec < k8s_openapi:: api:: core:: v1:: EnvFromSource > > {
157+ self . 0 . env_from . as_ref ( )
158158 }
159159
160160 /// Get image of container as `oci_distribution::Reference`.
@@ -186,8 +186,8 @@ impl Container {
186186 }
187187
188188 /// Get ports of container.
189- pub fn ports ( & self ) -> & Vec < k8s_openapi:: api:: core:: v1:: ContainerPort > {
190- & self . 0 . ports
189+ pub fn ports ( & self ) -> Option < & Vec < k8s_openapi:: api:: core:: v1:: ContainerPort > > {
190+ self . 0 . ports . as_ref ( )
191191 }
192192
193193 /// Get readiness probe of container.
@@ -236,13 +236,13 @@ impl Container {
236236 }
237237
238238 /// Get volume devices of container.
239- pub fn volume_devices ( & self ) -> & Vec < k8s_openapi:: api:: core:: v1:: VolumeDevice > {
240- & self . 0 . volume_devices
239+ pub fn volume_devices ( & self ) -> Option < & Vec < k8s_openapi:: api:: core:: v1:: VolumeDevice > > {
240+ self . 0 . volume_devices . as_ref ( )
241241 }
242242
243243 /// Get volume mounts of container.
244- pub fn volume_mounts ( & self ) -> & Vec < k8s_openapi:: api:: core:: v1:: VolumeMount > {
245- & self . 0 . volume_mounts
244+ pub fn volume_mounts ( & self ) -> Option < & Vec < k8s_openapi:: api:: core:: v1:: VolumeMount > > {
245+ self . 0 . volume_mounts . as_ref ( )
246246 }
247247
248248 /// Get working directory of container.
0 commit comments