in pkg/clientset/versioned/typed/networking/v1alpha3/fake/fake_destinationrule.gen.go [146:165]
func (c *FakeDestinationRules) Apply(ctx context.Context, destinationRule *networkingv1alpha3.DestinationRuleApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.DestinationRule, err error) {
if destinationRule == nil {
return nil, fmt.Errorf("destinationRule provided to Apply must not be nil")
}
data, err := json.Marshal(destinationRule)
if err != nil {
return nil, err
}
name := destinationRule.Name
if name == nil {
return nil, fmt.Errorf("destinationRule.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(destinationrulesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha3.DestinationRule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.DestinationRule), err
}