func()

in pkg/clientset/versioned/typed/networking/v1alpha3/gateway.gen.go [201:224]


func (c *gateways) Apply(ctx context.Context, gateway *networkingv1alpha3.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.Gateway, err error) {
	if gateway == nil {
		return nil, fmt.Errorf("gateway provided to Apply must not be nil")
	}
	patchOpts := opts.ToPatchOptions()
	data, err := json.Marshal(gateway)
	if err != nil {
		return nil, err
	}
	name := gateway.Name
	if name == nil {
		return nil, fmt.Errorf("gateway.Name must be provided to Apply")
	}
	result = &v1alpha3.Gateway{}
	err = c.client.Patch(types.ApplyPatchType).
		Namespace(c.ns).
		Resource("gateways").
		Name(*name).
		VersionedParams(&patchOpts, scheme.ParameterCodec).
		Body(data).
		Do(ctx).
		Into(result)
	return
}