func()

in pkg/clientset/versioned/typed/networking/v1beta1/fake/fake_gateway.gen.go [146:165]


func (c *FakeGateways) Apply(ctx context.Context, gateway *networkingv1beta1.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Gateway, err error) {
	if gateway == nil {
		return nil, fmt.Errorf("gateway provided to Apply must not be nil")
	}
	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")
	}
	obj, err := c.Fake.
		Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Gateway{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Gateway), err
}